mjsax commented on code in PR #16906:
URL: https://github.com/apache/kafka/pull/16906#discussion_r1731846016


##########
streams/src/main/java/org/apache/kafka/streams/state/internals/InMemorySessionStore.java:
##########
@@ -102,18 +103,13 @@ public void init(final StateStoreContext 
stateStoreContext,
 
         // The provided context is not required to implement 
InternalProcessorContext,
         // If it doesn't, we can't record this metric.
-        if (stateStoreContext instanceof InternalProcessorContext) {
-            this.context = (InternalProcessorContext) stateStoreContext;
-            final StreamsMetricsImpl metrics = this.context.metrics();
-            expiredRecordSensor = TaskMetrics.droppedRecordsSensor(
-                threadId,
-                taskName,
-                metrics
-            );
-        } else {
-            this.context = null;
-            expiredRecordSensor = null;
-        }
+        this.context = asInternalProcessorContext(stateStoreContext);

Review Comment:
   It seems this change breaks the test -- let's not apply this change but keep 
the code as-is.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to