Skip to content

Conversation

@shashankhs11
Copy link
Contributor

@shashankhs11 shashankhs11 commented Nov 30, 2025

This PR is continuation of the work related to cleaning up of the old
stateupdater code and is a sub-task of
KAFKA-18913

  • Clean up of StreamThreadTest.java
  • Clean up of StoreChangelogReaderTest.java
  • We also change the config to ALWAYS enable stateupdater

Reviewers: Lucas Brutschy [email protected]

@github-actions github-actions bot added triage PRs from the community streams tests Test fixes (including flaky tests) labels Nov 30, 2025
@shashankhs11
Copy link
Contributor Author

@lucasbru, tagging for review :)

@@ -1396,7 +1363,7 @@ public void shouldOnlyCompleteShutdownAfterRebalanceNotInProgress(final boolean
assertTrue(thread.isAlive());

Thread.sleep(1000);
assertEquals(Set.of(task1, task2), thread.taskManager().activeTaskIds());
assertEquals(Set.of(task1, task2), thread.taskManager().allTasks().keySet());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use allTasks() here because the tasks, at this moment, may also be in the initialization queue and not active.

tasks.addPendingTasksToInit(newActiveTasks)

@github-actions github-actions bot removed the triage PRs from the community label Dec 1, 2025
@shashankhs11 shashankhs11 changed the title KAFKA-19942: Clean up StreamThread Test KAFKA-19942: Clean up StreamThread and StoreChangelogReader Test Dec 1, 2025
@lucasbru lucasbru requested review from Copilot and lucasbru December 1, 2025 12:51
@lucasbru lucasbru self-assigned this Dec 1, 2025
Copilot finished reviewing on behalf of lucasbru December 1, 2025 12:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the old state updater toggle infrastructure as part of KAFKA-18913 cleanup work. The state updater is now always enabled, simplifying the codebase by removing conditional logic and duplicate test methods.

  • Removed stateUpdaterEnabled parameter from all test methods
  • Converted parameterized tests from @MethodSource("data") to @ValueSource(booleans = {true, false}) for processingThreadsEnabled
  • Hardcoded state updater configuration to always be enabled

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.

File Description
StreamThreadTest.java Removed stateUpdaterEnabled parameter from all tests, deleted unused imports and helper methods, simplified test logic by removing state updater conditionals
StoreChangelogReaderTest.java Consolidated duplicate test methods, removed state updater parameter and conditional logic
StreamsConfig.java Modified InternalConfig.stateUpdaterEnabled() to always return true

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

};
}
throw taskMigratedException;
});
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected. Please remove the trailing whitespace on this line for consistency with the project's code style.

Copilot uses AI. Check for mistakes.
Copy link
Member

@lucasbru lucasbru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


public static boolean stateUpdaterEnabled(final Map<String, Object> configs) {
return InternalConfig.getBoolean(configs, InternalConfig.STATE_UPDATER_ENABLED, true);
return true; // always enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this is temporary and will be removed soon

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! The config will be removed in a follow-up PR.
I have all the changes ready and will open a PR as
soon as we merge this one.

@lucasbru lucasbru merged commit 55d557c into apache:trunk Dec 2, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved streams tests Test fixes (including flaky tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants