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 2022/12/08 18:08:30 UTC

[GitHub] [kafka] cmccabe commented on a diff in pull request #12964: MINOR: Introduce MetadataProvenance and ImageReWriter

cmccabe commented on code in PR #12964:
URL: https://github.com/apache/kafka/pull/12964#discussion_r1043668840


##########
metadata/src/main/java/org/apache/kafka/image/MetadataDelta.java:
##########
@@ -152,19 +153,7 @@ public Optional<MetadataVersion> metadataVersionChanged() {
         }
     }
 
-    public void read(long highestOffset, int highestEpoch, Iterator<List<ApiMessageAndVersion>> reader) {
-        while (reader.hasNext()) {
-            List<ApiMessageAndVersion> batch = reader.next();
-            for (ApiMessageAndVersion messageAndVersion : batch) {
-                replay(highestOffset, highestEpoch, messageAndVersion.message());
-            }
-        }
-    }
-
-    public void replay(long offset, int epoch, ApiMessage record) {
-        highestOffset = offset;
-        highestEpoch = epoch;
-
+    public void replay(ApiMessage record) {

Review Comment:
   Offset and epoch are a bit silly in cases like when loading a snapshot, where all records have the same offset and epoch.
   
   This information is better tracked by the metadata loader and if we need it, we always have it there. We also have other information such as the source of the records and so on, in the loader.



-- 
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-unsubscribe@kafka.apache.org

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