Skip to content

Commit

Permalink
MINOR improve startup log in QuorumController (#15926)
Browse files Browse the repository at this point in the history
Reviewers: David Arthur <mumrah@gmail.com>
  • Loading branch information
chickenchickenlove authored Jun 17, 2024
1 parent 92d8d4b commit 1a7ba66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ static ControllerResult<Void> recordsForNonEmptyLog(
throw new RuntimeException("Should not have ZK migrations enabled on a cluster that was " +
"created in KRaft mode.");
}
logMessageBuilder.append("This is expected because this is a de-novo KRaft cluster.");
break;
case PRE_MIGRATION:
if (!metadataVersion.isMetadataTransactionSupported()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ public void testActivationMessageForNonEmptyLogNoMigrations() {
assertEquals(0, result.records().size());

result = ActivationRecordsGenerator.recordsForNonEmptyLog(
logMsg -> assertEquals("Performing controller activation. Loaded ZK migration state of NONE.", logMsg),
logMsg -> assertEquals("Performing controller activation. Loaded ZK migration state of NONE. "
+ "This is expected because this is a de-novo KRaft cluster.", logMsg),
-1L,
false,
buildFeatureControl(MetadataVersion.IBP_3_4_IV0, Optional.empty()),
Expand All @@ -203,7 +204,8 @@ public void testActivationMessageForNonEmptyLogNoMigrations() {

result = ActivationRecordsGenerator.recordsForNonEmptyLog(
logMsg -> assertEquals("Performing controller activation. Aborting in-progress metadata " +
"transaction at offset 42. Loaded ZK migration state of NONE.", logMsg),
"transaction at offset 42. Loaded ZK migration state of NONE. " +
"This is expected because this is a de-novo KRaft cluster.", logMsg),
42L,
false,
buildFeatureControl(MetadataVersion.IBP_3_6_IV1, Optional.empty()),
Expand Down

0 comments on commit 1a7ba66

Please sign in to comment.