Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10310 Kafka Raft Snapshot
  3. KAFKA-13020

SnapshotReader should decode and report the append time in the header

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.5.0
    • None
    • None

    Description

      We want to expose control messages through o.a.k.r.Batch and RecordsIterator. This can be done by turning the type Batch<T> into an interface and adding the type ControlBatch implements Batch<?> and DataBatch<T> implements Batch<T>. The main different between DataBatch<T> and ControlBatch is that control record have a decoder that knows how to decode LeaderChangeMessageSnapshotHeaderRecord and SnapshotFooterRecord.

      These are the import type and signatures that we expose:

      1. class RecordsIterator<T> implements Iterator<Batch<T>> this type will keep the current signature but it will be extended to know how to decode both Data and Control batches
      2. interface BatchReader<T> extends Iterator<DataBatch<T>> this type only returns data batches
      3. class SnapshotReader<T> implements Iterator<DataBatch<T>> this type only returns data batches but when it reads the header record it remembers the last contained log timestamp

      Attachments

        Issue Links

          Activity

            People

              jagsancio Jose Armando Garcia Sancio
              jagsancio Jose Armando Garcia Sancio
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: