Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-18011

Avoid obtaining LogManager to stream RAFT snapshots

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • 3.0.0-beta2
    • persistence

    Description

      When freezing an outgoing snapshot scope (see OutgoingSnapshot#freezeScope()), we need to get snapshot metadata corresponding to the contents of our storages (MV+TX) at that precise moment. The snapshot metadata includes last applied index (which we have), also term and lists of followers and learners which we need to obtain. In JRaft, we can take them from LogManager.

      The problem is that JRaft does not provide a way to get the corresponding LogManager from this code. The 'right' way to fix this would be to change JRaft internals so that LogManager instance is made available to snapshot readers. But we should not touch JRaft core when we can avoid this (because, in the future, we might need to merge new version of JRaft into our codebase). So current implementation adds a way to obtain the current JRaft Node and then take LogManager instance from it.

      A facility to get peers (followers/learners) is planned in the future, it could be used instead of a LogManager. But it's not clear how a term could be obtained without it.

      Attachments

        Issue Links

          Activity

            People

              rpuch Roman Puchkovskiy
              rpuch Roman Puchkovskiy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: