navina commented on code in PR #8564:
URL: https://github.com/apache/pinot/pull/8564#discussion_r854429332


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/LLRealtimeSegmentDataManager.java:
##########
@@ -1457,7 +1458,16 @@ private void makeStreamConsumer(String reason) {
     _segmentLogger.info("Creating new stream consumer for topic partition {} , 
reason: {}", _clientId, reason);
     _partitionGroupConsumer =
         _streamConsumerFactory.createPartitionGroupConsumer(_clientId, 
_partitionGroupConsumptionStatus);
-    
_partitionGroupConsumer.start(_partitionGroupConsumptionStatus.getStartOffset());
+    _partitionGroupConsumer.start(_currentOffset);
+  }
+  /**
+   * Checkpoints existing consumer before creating a new consumer instance
+   */
+  private void recreateStreamConsumer(String reason) {
+    if (_partitionGroupConsumer != null) {
+      _currentOffset = _partitionGroupConsumer.checkpoint(_currentOffset);
+    }
+    makeStreamConsumer(reason);

Review Comment:
   Ok. I have made the change. 



-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to