-
Notifications
You must be signed in to change notification settings - Fork 14.6k
KAFKA-18913: Consider removing state-updater feature flag - 2 #20382
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
base: trunk
Are you sure you want to change the base?
Changes from all commits
06f187e
ff8b7be
c92125a
1a2838b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,6 @@ | |
import org.apache.kafka.common.utils.LogContext; | ||
import org.apache.kafka.common.utils.Time; | ||
import org.apache.kafka.streams.StreamsConfig; | ||
import org.apache.kafka.streams.StreamsConfig.InternalConfig; | ||
import org.apache.kafka.streams.errors.StreamsException; | ||
import org.apache.kafka.streams.errors.TaskCorruptedException; | ||
import org.apache.kafka.streams.processor.StandbyUpdateListener; | ||
|
@@ -236,7 +235,7 @@ public StoreChangelogReader(final Time time, | |
this.stateRestoreListener = stateRestoreListener; | ||
this.standbyUpdateListener = standbyUpdateListener; | ||
|
||
this.stateUpdaterEnabled = InternalConfig.stateUpdaterEnabled(config.originals()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we only use this in one place, and it should be possible to remove the variable (and it's usage) completely, in one go |
||
this.stateUpdaterEnabled = true; | ||
|
||
this.groupId = config.getString(StreamsConfig.APPLICATION_ID_CONFIG); | ||
this.pollTime = Duration.ofMillis(config.getLong(StreamsConfig.POLL_MS_CONFIG)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,7 +393,7 @@ public static StreamThread create(final TopologyMetadata topologyMetadata, | |
final Runnable shutdownErrorHook, | ||
final BiConsumer<Throwable, Boolean> streamsUncaughtExceptionHandler) { | ||
|
||
final boolean stateUpdaterEnabled = InternalConfig.stateUpdaterEnabled(config.originals()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This class is more complex. Might be better to split into a different PR, as it required more cleanup. Doing a partial cleanup for a single class, is not a "clean cut" and make reviewing more complex. |
||
final boolean stateUpdaterEnabled = true; | ||
|
||
final String threadId = clientId + THREAD_ID_SUBSTRING + threadIdx; | ||
final String stateUpdaterId = threadId.replace(THREAD_ID_SUBSTRING, STATE_UPDATER_ID_SUBSTRING); | ||
|
@@ -440,7 +440,6 @@ public static StreamThread create(final TopologyMetadata topologyMetadata, | |
threadIdx, | ||
processId, | ||
logContext, | ||
stateUpdaterEnabled, | ||
proceessingThreadsEnabled | ||
); | ||
final StandbyTaskCreator standbyTaskCreator = new StandbyTaskCreator( | ||
|
@@ -450,8 +449,7 @@ public static StreamThread create(final TopologyMetadata topologyMetadata, | |
stateDirectory, | ||
changelogReader, | ||
threadId, | ||
logContext, | ||
stateUpdaterEnabled); | ||
logContext); | ||
|
||
final Tasks tasks = new Tasks(logContext); | ||
final boolean processingThreadsEnabled = | ||
|
@@ -858,7 +856,7 @@ public StreamThread(final Time time, | |
|
||
this.numIterations = 1; | ||
this.eosEnabled = eosEnabled(config); | ||
this.stateUpdaterEnabled = InternalConfig.stateUpdaterEnabled(config.originals()); | ||
this.stateUpdaterEnabled = true; | ||
this.processingThreadsEnabled = InternalConfig.processingThreadsEnabled(config.originals()); | ||
this.logSummaryIntervalMs = config.getLong(StreamsConfig.LOG_SUMMARY_INTERVAL_MS_CONFIG); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -280,7 +280,6 @@ private void createTasks() { | |
0, | ||
uuid, | ||
new LogContext(), | ||
false, | ||
false); | ||
|
||
assertThat( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ | |
import org.apache.kafka.test.StreamsTestUtils; | ||
|
||
import org.apache.logging.log4j.Level; | ||
import org.junit.jupiter.api.Disabled; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.junit.jupiter.params.ParameterizedTest; | ||
|
@@ -416,6 +417,7 @@ public void shouldPollWithRightTimeoutWithStateUpdater(final Task.TaskType type) | |
shouldPollWithRightTimeout(true, type); | ||
} | ||
|
||
@Disabled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would not disable this test, but rather clean it up directly. Or exclude |
||
@ParameterizedTest | ||
@EnumSource(value = Task.TaskType.class, names = {"ACTIVE", "STANDBY"}) | ||
public void shouldPollWithRightTimeoutWithoutStateUpdater(final Task.TaskType type) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we pass this into
ProcessorStateManager
only -- let's move the variable, and hardcodetrue
for now.