You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/12/14 19:07:35 UTC

[GitHub] [kafka] rohitrmd edited a comment on pull request #9744: Kafka 10062 - Add a method to retrieve the current timestamp as known by the Streams app

rohitrmd edited a comment on pull request #9744:
URL: https://github.com/apache/kafka/pull/9744#issuecomment-744644019


   @mjsax @vvcephei @cadonna  StreamTaskTest is failing because of following issue:
   StreamTask -> process(wallClockTime) method updates processor context's system time in this method: https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java#L685
   AbstractProcessorContect has another systemTime field: https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/AbstractProcessorContext.java#L48 which is updated in streamTask's process method.
   
   Now the change in pr fetches system time from StreamTask's time field: 
   https://github.com/apache/kafka/pull/9744/files#diff-a76674468cda8772230fb8411717cf9068b1a363a792f32c602fb2ec5ba9efd7R1120
   This time field is not updated during [process](https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java#L665) call.  Hence tests fail. 
   
   What do you recommend in this case? Get rid of [currentSystemTimeMs](https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/AbstractProcessorContext.java#L48) from AbstractProcessorContext? If we get rid of this field, then how do we update StreamTask's [time](https://github.com/apache/kafka/blob/trunk/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java#L73) field as it's immutable. 


----------------------------------------------------------------
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.

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