Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-477

Improve LogStateMachine.processReadRequest()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • LogService
    • 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

      Attachments

        1. RATIS-477.001.patch
          41 kB
          Josh Elser

        Issue Links

          Activity

            People

              elserj Josh Elser
              elserj Josh Elser
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: