ashmeet13 commented on PR #12414:
URL: https://github.com/apache/kafka/pull/12414#issuecomment-1204360460

   Hi @jsancio, I have defined an enum in the raft module for `SnapshotReason` 
and have used it in place of string messages that were being passed previously.
   
   I am working on making the changes for `RaftClient` and `KafkaMetadataLog`. 
These changes will log the snapshot reason in `createNewSnapshot` function of 
`KafkaMetadataLog`.
   
   I had two implementation queries, could you please help with them - 
   1. How do we handle multiple reasons for starting a snapshot in an enum? 
   2. I would also need to change the function signature of 
`createNewSnapshot()` in `KafkaMetadataLog` to accommodate the new 
`SnapshotReason` parameter. Below is the new signature. Would this be okay?
   
   ```
   Optional<RawSnapshotWriter> createNewSnapshot(OffsetAndEpoch snapshotId, 
SnapshotReason reason);
   ```
   
   


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