Class PaxosUncommittedTracker


  • public class PaxosUncommittedTracker
    extends java.lang.Object
    Tracks uncommitted paxos operations to enable operation completion as part of repair by returning an iterator of partition keys with uncommitted paxos operations (and their consistency levels) for a given table and token range(s) There are 2 parts to the uncommitted states it tracks: operations flushed to disk, and updates still in memory. This class handles merging these two sources for queries and for merging states as part of flush. In practice, in memory updates are the contents of the system.paxos memtables, although this has been generalized into an "UpdateSupplier" interface to accomodate testing.
    • Constructor Detail

      • PaxosUncommittedTracker

        public PaxosUncommittedTracker​(File dataDirectory,
                                       com.google.common.collect.ImmutableMap<TableId,​UncommittedTableData> tableStates)
      • PaxosUncommittedTracker

        public PaxosUncommittedTracker​(File dataDirectory)
    • Method Detail

      • getDirectory

        public File getDirectory()
      • truncate

        public static void truncate​(File dataDirectory)
      • start

        public void start()
      • rebuild

        public void rebuild​(java.util.Iterator<PaxosKeyState> iterator)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • startAutoRepairs

        public void startAutoRepairs()
      • hasInflightAutoRepairs

        public boolean hasInflightAutoRepairs()
      • isAutoRepairsEnabled

        public boolean isAutoRepairsEnabled()
      • setAutoRepairsEnabled

        public void setAutoRepairsEnabled​(boolean autoRepairsEnabled)
      • isStateFlushEnabled

        public boolean isStateFlushEnabled()
      • setStateFlushEnabled

        public void setStateFlushEnabled​(boolean enabled)
      • tableIds

        public java.util.Set<TableId> tableIds()