omkreddy commented on code in PR #17858:
URL: https://github.com/apache/kafka/pull/17858#discussion_r1851279237


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java:
##########
@@ -1294,19 +1294,19 @@ private void resetOffsets(final Set<TopicPartition> 
partitions, final Exception
         final Set<TopicPartition> notReset = new HashSet<>();
 
         for (final TopicPartition partition : partitions) {
-            final OffsetResetStrategy offsetResetStrategy = 
topologyMetadata.offsetResetStrategy(partition.topic());
+            final AutoOffsetResetStrategy offsetResetStrategy = 
topologyMetadata.offsetResetStrategy(partition.topic());
 
             // This may be null if the task we are currently processing was 
apart of a named topology that was just removed.
             // TODO KAFKA-13713: keep the StreamThreads and TopologyMetadata 
view of named topologies in sync until final thread has acked
             if (offsetResetStrategy != null) {
-                switch (offsetResetStrategy) {
-                    case EARLIEST:
+                switch (offsetResetStrategy.name()) {

Review Comment:
   As mentioned in other comment,  enum wont help much here. We will be having 
different instances DurationBasedStrategy class.  I have the updated code to 
avoid string comparisons.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to