Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchCommand.DefaultBuilderCapacity is not used #572

Closed
PiemP opened this issue Jun 10, 2024 · 6 comments · Fixed by #584
Closed

BatchCommand.DefaultBuilderCapacity is not used #572

PiemP opened this issue Jun 10, 2024 · 6 comments · Fixed by #584

Comments

@PiemP
Copy link

PiemP commented Jun 10, 2024

Good day to everyone.

Today I have initialized a new OrchardCore site and I have see this line in the logging file:

YesSql|The default capacity of the BatchCommand StringBuilder 10240 might not be sufficient. It can be increased with BatchCommand.DefaultBuilderCapacity to at least 41448

I have search about it but I don't find any information. This should be worry me?

Thank you

@hishamco
Copy link
Contributor

logger.LogWarning("The default capacity of the BatchCommand StringBuilder {Default} might not be sufficient. It can be increased with BatchCommand.DefaultBuilderCapacity to at least {Suggested}", DefaultBuilderCapacity, command.Length);

@sebastienros
Copy link
Owner

sebastienros commented Jun 11, 2024

It's actually a useless warning because the DefaultBuilderCapacity constant is not even used. I believe it was intended for a StringBuilder but the current logic is just concatenating all the queries into a single one (probably using an SB though).

@PiemP
Copy link
Author

PiemP commented Jun 11, 2024

Thank you guys,

I can close this question or you prefer that I leave it open?

@PiemP PiemP changed the title QUESTION - WARN remarks in logging QUESTION - WARN BatchCommand.DefaultBuilderCapacity remarks in logging Jun 11, 2024
@sebastienros sebastienros changed the title QUESTION - WARN BatchCommand.DefaultBuilderCapacity remarks in logging BatchCommand.DefaultBuilderCapacity is not used Jun 11, 2024
@sebastienros
Copy link
Owner

sebastienros commented Jun 11, 2024

I renamed it so we can leave it open

@hishamco
Copy link
Contributor

Shall we remove this warning Seb?

@Piedone
Copy link
Contributor

Piedone commented Jul 26, 2024

This was used when adding it in #316 but not anymore. Seems like a trivial fix, so submitted #584.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants