kamalcph commented on code in PR #14652:
URL: https://github.com/apache/kafka/pull/14652#discussion_r1398646778


##########
core/src/main/java/kafka/server/ReplicaFetcherTierStateMachine.java:
##########
@@ -238,12 +238,8 @@ private Long buildRemoteLogAuxState(TopicPartition 
topicPartition,
 
                 log.debug("Updated the epoch cache from remote tier till 
offset: {} with size: {} for {}", leaderLocalLogStartOffset, epochs.size(), 
partition);
 
-                // Restore producer snapshot
-                File snapshotFile = 
LogFileUtils.producerSnapshotFile(unifiedLog.dir(), nextOffset);
-                buildProducerSnapshotFile(snapshotFile, 
remoteLogSegmentMetadata, rlm);
-
                 // Reload producer snapshots.
-                
unifiedLog.producerStateManager().truncateFullyAndReloadSnapshots();
+                truncateFullyAndReloadRestoredSnapshots(unifiedLog, 
nextOffset, remoteLogSegmentMetadata, rlm);

Review Comment:
   Nice catch @hudeqi! This is the expected behaviour, not sure why this was 
changed while porting it to trunk:
   
   
https://sourcegraph.com/github.com/satishd/kafka@2.8.x-tiered-storage/-/blob/core/src/main/scala/kafka/server/ReplicaFetcherThread.scala?L422-437



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