dengziming created KAFKA-10195: ---------------------------------- Summary: Move offset management codes from ConsumerCoordinator to a new class Key: KAFKA-10195 URL: https://issues.apache.org/jira/browse/KAFKA-10195 Project: Kafka Issue Type: Improvement Components: clients, consumer Reporter: dengziming Assignee: dengziming
ConsumerCoordinator has 2 main functions: # partitions assignment # offset management We are adding some new features in it, for example KAFKA-9657 add a field `throwOnFetchStableOffsetsUnsupported` which only used in offset management. And the 2 functions almost don't interact with each other, so it's not wise to put these code in one single class, can we try to move offset management code to a new class. For example, the below fields only used in offset management: ``` // can be move to another class directly private final OffsetCommitCallback defaultOffsetCommitCallback; private final ConsumerInterceptors<?, ?> interceptors; private final AtomicInteger pendingAsyncCommits; private final ConcurrentLinkedQueue<OffsetCommitCompletion> completedOffsetCommits; private AtomicBoolean asyncCommitFenced; private final boolean throwOnFetchStableOffsetsUnsupported; private PendingCommittedOffsetRequest pendingCommittedOffsetRequest = null; // used in `onJoinComplete` but can also be moved out. private final boolean autoCommitEnabled; private final int autoCommitIntervalMs; private Timer nextAutoCommitTimer; ``` so we can just create a new class `OffsetManageCoordinator` and move the related codes into it. -- This message was sent by Atlassian Jira (v8.3.4#803005)