Core: Fix garbled commit-timeout message using unsupported {} placeholders#17110
Open
anxkhn wants to merge 1 commit into
Open
Core: Fix garbled commit-timeout message using unsupported {} placeholders#17110anxkhn wants to merge 1 commit into
anxkhn wants to merge 1 commit into
Conversation
…lders
BaseCommitService.close throws an IllegalArgumentException via
Guava Preconditions.checkArgument when the commit pool does not finish
within the timeout. The message used SLF4J-style {} placeholders, but
Guava's message formatter only understands %s. As a result the two {}
were printed literally and the file-group counts were appended in a
trailing [x, y] bracket, so operators saw a garbled message on the
rewrite/compaction commit-timeout path.
Replace the two {} with %s so the committed and uncommitted counts are
substituted inline. Strengthen TestCommitService.testAbortFileGroupsAfterTimeout
to assert the counts appear inline and that no literal {} remains.
Generated-by: opencode
nastra
approved these changes
Jul 6, 2026
Contributor
|
I did a quick scan across the codebase using Claude and we have a few other places that are affected. Could you please fix those as well?
|
singhpk234
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
BaseCommitService.close()throws anIllegalArgumentExceptionvia GuavaPreconditions.checkArgumentwhen the commit pool does not finish within theconfigured timeout (the rewrite/compaction commit-timeout path). The message
template used SLF4J-style
{}placeholders:Guava's
Preconditionsmessage formatter only understands%s, not{}.Because the placeholders never match, both
{}are printed literally and thetwo count arguments are appended in a trailing
[x, y]bracket. Operators whohit a commit timeout therefore see a garbled diagnostic, for example:
The fix
Replace the two
{}with%sso the committed and uncommitted counts aresubstituted inline. The two existing arguments (
committedRewrites.size(),completedRewrites.size()) already line up positionally with the two%s, andthe wording is unchanged. The correct
{}usage just above (theLOG.warnatBaseCommitService.java:176) is a genuine SLF4J call, which is the likelysource of the copy-paste.
Test
Strengthens the existing regression test
TestCommitService.testAbortFileGroupsAfterTimeoutso it guards this bug: inaddition to the existing
hasMessageContaining("Timeout occurred when waiting for commits"), it now asserts the message contains no literal{}and that thecounts render inline (
N file groups committed. N file groups remain uncommitted.). Reverting only the source change makes the test fail on the{}assertion; the fix makes it pass.both pass (2 tests, 0 failures).
Notes
core/only; no API change; wording preserved.BaseCommitService.java(Core: Serialize commits in BaseCommitService #16825 serializing commits,Core, Spark: Fix incorrect partial commit failure count in rewrite data files #16970 fixing the partial-commit failure count) but neither touches this
timeout message, so there is no line-level conflict.
AI Disclosure
{}placeholders inside a GuavaPreconditions.checkArgument(which only supports%s), and add a regression assertion.