Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
vrodionov and rajeshbabu were asking about this in RATIS-470. Can we improve the logic that reads through the "head" of the RaftLog to find the "LogService offset"?
Vlad suggested:
Josh, can we simplify this a little bit? Client gets Raft log ID one every append, for multi-get calls we can use this LogID (RAFT) as our start log ID to avoid iterating through all logs, then you can unwind log entries by using new logic, see above:
int numRecordsInAppend = append.getDataCount();There is no need to iterate from the very beginning