Class InternalEngine

java.lang.Object
org.elasticsearch.index.engine.Engine
org.elasticsearch.index.engine.InternalEngine
All Implemented Interfaces:
Closeable, AutoCloseable

public class InternalEngine extends Engine
  • Field Details

    • REAL_TIME_GET_REFRESH_SOURCE

      protected static final String REAL_TIME_GET_REFRESH_SOURCE
      See Also:
    • UNSAFE_VERSION_MAP_REFRESH_SOURCE

      protected static final String UNSAFE_VERSION_MAP_REFRESH_SOURCE
      See Also:
    • translogGetCount

      public final AtomicLong translogGetCount
    • translogInMemorySegmentsCount

      public final AtomicLong translogInMemorySegmentsCount
  • Constructor Details

    • InternalEngine

      public InternalEngine(EngineConfig engineConfig)
  • Method Details

    • translogPersistedSeqNoConsumer

      protected LongConsumer translogPersistedSeqNoConsumer()
    • completionStats

      public CompletionStats completionStats(String... fieldNamePatterns)
      Description copied from class: Engine
      Returns the CompletionStats for this engine
      Specified by:
      completionStats in class Engine
    • restoreLocalHistoryFromTranslog

      public int restoreLocalHistoryFromTranslog(Engine.TranslogRecoveryRunner translogRecoveryRunner) throws IOException
      Description copied from class: Engine
      This method replays translog to restore the Lucene index which might be reverted previously. This ensures that all acknowledged writes are restored correctly when this engine is promoted.
      Specified by:
      restoreLocalHistoryFromTranslog in class Engine
      Returns:
      the number of translog operations have been recovered
      Throws:
      IOException
    • fillSeqNoGaps

      public int fillSeqNoGaps(long primaryTerm) throws IOException
      Description copied from class: Engine
      Fills up the local checkpoints history with no-ops until the local checkpoint and the max seen sequence ID are identical.
      Specified by:
      fillSeqNoGaps in class Engine
      Parameters:
      primaryTerm - the shards primary term this engine was created for
      Returns:
      the number of no-ops added
      Throws:
      IOException
    • recoverFromTranslog

      public void recoverFromTranslog(Engine.TranslogRecoveryRunner translogRecoveryRunner, long recoverUpToSeqNo, ActionListener<Void> listener)
      Description copied from class: Engine
      Performs recovery from the transaction log up to recoverUpToSeqNo (inclusive). This operation will close the engine if the recovery fails.
      Specified by:
      recoverFromTranslog in class Engine
      Parameters:
      translogRecoveryRunner - the translog recovery runner
      recoverUpToSeqNo - the upper bound, inclusive, of sequence number to be recovered
      listener - listener notified on completion of the recovery, whether successful or otherwise
    • skipTranslogRecovery

      public void skipTranslogRecovery()
      Description copied from class: Engine
      Do not replay translog operations, but make the engine be ready.
      Specified by:
      skipTranslogRecovery in class Engine
    • newTranslogSnapshot

      protected Translog.Snapshot newTranslogSnapshot(long fromSeqNo, long toSeqNo) throws IOException
      Throws:
      IOException
    • isTranslogSyncNeeded

      public boolean isTranslogSyncNeeded()
      Description copied from class: Engine
      Checks if the underlying storage sync is required.
      Specified by:
      isTranslogSyncNeeded in class Engine
    • asyncEnsureTranslogSynced

      public void asyncEnsureTranslogSynced(Translog.Location location, Consumer<Exception> listener)
      Description copied from class: Engine
      Ensures that the location has been written to the underlying storage.
      Specified by:
      asyncEnsureTranslogSynced in class Engine
    • asyncEnsureGlobalCheckpointSynced

      public void asyncEnsureGlobalCheckpointSynced(long globalCheckpoint, Consumer<Exception> listener)
      Description copied from class: Engine
      Ensures that the global checkpoint has been persisted to the underlying storage.
      Specified by:
      asyncEnsureGlobalCheckpointSynced in class Engine
    • syncTranslog

      public void syncTranslog() throws IOException
      Specified by:
      syncTranslog in class Engine
      Throws:
      IOException
    • getTranslogStats

      public TranslogStats getTranslogStats()
      Specified by:
      getTranslogStats in class Engine
    • getTranslogLastWriteLocation

      public Translog.Location getTranslogLastWriteLocation()
      Description copied from class: Engine
      Returns the last location that the translog of this engine has written into.
      Specified by:
      getTranslogLastWriteLocation in class Engine
    • getHistoryUUID

      public String getHistoryUUID()
      Description copied from class: Engine
      returns the history uuid for the engine
      Specified by:
      getHistoryUUID in class Engine
    • getForceMergeUUID

      @Nullable public String getForceMergeUUID()
      returns the force merge uuid for the engine
    • getWritingBytes

      public long getWritingBytes()
      Returns how many bytes we are currently moving from indexing buffer to segments on disk
      Specified by:
      getWritingBytes in class Engine
    • createInternalReaderManager

      protected ElasticsearchReaderManager createInternalReaderManager(ElasticsearchDirectoryReader directoryReader)
    • get

      public Engine.GetResult get(Engine.Get get, MappingLookup mappingLookup, DocumentParser documentParser, Function<Engine.Searcher,Engine.Searcher> searcherWrapper)
      Specified by:
      get in class Engine
    • getFromTranslog

      public Engine.GetResult getFromTranslog(Engine.Get get, MappingLookup mappingLookup, DocumentParser documentParser, Function<Engine.Searcher,Engine.Searcher> searcherWrapper)
      Description copied from class: Engine
      Overrides:
      getFromTranslog in class Engine
    • realtimeGetUnderLock

      protected Engine.GetResult realtimeGetUnderLock(Engine.Get get, MappingLookup mappingLookup, DocumentParser documentParser, Function<Engine.Searcher,Engine.Searcher> searcherWrapper, boolean getFromSearcher)
      Parameters:
      getFromSearcher - indicates whether we also try the internal searcher if not found in translog. In the case where we just started tracking locations in the translog, we always use the internal searcher.
    • assertPrimaryCanOptimizeAddDocument

      protected boolean assertPrimaryCanOptimizeAddDocument(Engine.Index index)
    • assertPrimaryIncomingSequenceNumber

      protected boolean assertPrimaryIncomingSequenceNumber(Engine.Operation.Origin origin, long seqNo)
    • generateSeqNoForOperationOnPrimary

      protected long generateSeqNoForOperationOnPrimary(Engine.Operation operation)
    • advanceMaxSeqNoOfUpdatesOnPrimary

      protected void advanceMaxSeqNoOfUpdatesOnPrimary(long seqNo)
    • advanceMaxSeqNoOfDeletesOnPrimary

      protected void advanceMaxSeqNoOfDeletesOnPrimary(long seqNo)
    • index

      public Engine.IndexResult index(Engine.Index index) throws IOException
      Description copied from class: Engine
      Perform document index operation on the engine
      Specified by:
      index in class Engine
      Parameters:
      index - operation to perform
      Returns:
      Engine.IndexResult containing updated translog location, version and document specific failures Note: engine level failures (i.e. persistent engine failures) are thrown
      Throws:
      IOException
    • planIndexingAsNonPrimary

      protected final InternalEngine.IndexingStrategy planIndexingAsNonPrimary(Engine.Index index) throws IOException
      Throws:
      IOException
    • indexingStrategyForOperation

      protected InternalEngine.IndexingStrategy indexingStrategyForOperation(Engine.Index index) throws IOException
      Throws:
      IOException
    • delete

      public Engine.DeleteResult delete(Engine.Delete delete) throws IOException
      Description copied from class: Engine
      Perform document delete operation on the engine
      Specified by:
      delete in class Engine
      Parameters:
      delete - operation to perform
      Returns:
      Engine.DeleteResult containing updated translog location, version and document specific failures Note: engine level failures (i.e. persistent engine failures) are thrown
      Throws:
      IOException
    • deletionStrategyForOperation

      protected InternalEngine.DeletionStrategy deletionStrategyForOperation(Engine.Delete delete) throws IOException
      Throws:
      IOException
    • planDeletionAsNonPrimary

      protected final InternalEngine.DeletionStrategy planDeletionAsNonPrimary(Engine.Delete delete) throws IOException
      Throws:
      IOException
    • assertNonPrimaryOrigin

      protected boolean assertNonPrimaryOrigin(Engine.Operation operation)
    • maybePruneDeletes

      public void maybePruneDeletes()
      Description copied from class: Engine
      Tries to prune buffered deletes from the version map.
      Specified by:
      maybePruneDeletes in class Engine
    • noOp

      public Engine.NoOpResult noOp(Engine.NoOp noOp) throws IOException
      Specified by:
      noOp in class Engine
      Throws:
      IOException
    • preFlightCheckForNoOp

      protected Optional<Exception> preFlightCheckForNoOp(Engine.NoOp noOp) throws IOException
      Executes a pre-flight check for a given NoOp. If this method returns a non-empty result, the engine won't process this NoOp and returns a failure.
      Throws:
      IOException
    • refresh

      public Engine.RefreshResult refresh(String source) throws EngineException
      Description copied from class: Engine
      Synchronously refreshes the engine for new search operations to reflect the latest changes.
      Specified by:
      refresh in class Engine
      Throws:
      EngineException
    • maybeRefresh

      public void maybeRefresh(String source, ActionListener<Engine.RefreshResult> listener) throws EngineException
      Description copied from class: Engine
      Asynchronously refreshes the engine for new search operations to reflect the latest changes unless another thread is already refreshing the engine concurrently.
      Specified by:
      maybeRefresh in class Engine
      Throws:
      EngineException
    • refreshInternalSearcher

      protected Engine.RefreshResult refreshInternalSearcher(String source, boolean block) throws EngineException
      Throws:
      EngineException
    • refresh

      protected final Engine.RefreshResult refresh(String source, Engine.SearcherScope scope, boolean block) throws EngineException
      Throws:
      EngineException
    • writeIndexingBuffer

      public void writeIndexingBuffer() throws IOException
      Description copied from class: Engine
      Called when our engine is using too much heap and should move buffered indexed/deleted documents to disk.
      Specified by:
      writeIndexingBuffer in class Engine
      Throws:
      IOException
    • reclaimVersionMapMemory

      protected void reclaimVersionMapMemory()
    • shouldPeriodicallyFlush

      public boolean shouldPeriodicallyFlush()
      Description copied from class: Engine
      Checks if this engine should be flushed periodically. This check is mainly based on the uncommitted translog size and the translog flush threshold setting.
      Specified by:
      shouldPeriodicallyFlush in class Engine
    • flushHoldingLock

      protected void flushHoldingLock(boolean force, boolean waitIfOngoing, ActionListener<Engine.FlushResult> listener) throws EngineException
      Description copied from class: Engine
      The actual implementation of Engine.flush(boolean, boolean, ActionListener), to be called either when holding a ref that ensures the engine remains open, or holding IndexShard#engineMutex while closing the engine.
      Specified by:
      flushHoldingLock in class Engine
      Throws:
      EngineException
    • isFlushLockIsHeldByCurrentThread

      protected final boolean isFlushLockIsHeldByCurrentThread()
    • hasUncommittedChanges

      protected boolean hasUncommittedChanges()
    • afterFlush

      protected void afterFlush(long generation)
    • rollTranslogGeneration

      public void rollTranslogGeneration() throws EngineException
      Description copied from class: Engine
      Rolls the translog generation and cleans unneeded.
      Specified by:
      rollTranslogGeneration in class Engine
      Throws:
      EngineException
    • trimUnreferencedTranslogFiles

      public void trimUnreferencedTranslogFiles() throws EngineException
      Description copied from class: Engine
      checks and removes translog files that no longer need to be retained. See TranslogDeletionPolicy for details
      Specified by:
      trimUnreferencedTranslogFiles in class Engine
      Throws:
      EngineException
    • shouldRollTranslogGeneration

      public boolean shouldRollTranslogGeneration()
      Description copied from class: Engine
      Tests whether or not the translog generation should be rolled to a new generation. This test is based on the size of the current generation compared to the configured generation threshold size.
      Specified by:
      shouldRollTranslogGeneration in class Engine
      Returns:
      true if the current generation should be rolled to a new generation
    • trimOperationsFromTranslog

      public void trimOperationsFromTranslog(long belowTerm, long aboveSeqNo) throws EngineException
      Description copied from class: Engine
      Trims translog for terms below belowTerm and seq# above aboveSeqNo
      Specified by:
      trimOperationsFromTranslog in class Engine
      Throws:
      EngineException
      See Also:
    • forceMerge

      public void forceMerge(boolean flush, int maxNumSegments, boolean onlyExpungeDeletes, String forceMergeUUID) throws EngineException, IOException
      Description copied from class: Engine
      Triggers a forced merge on this engine
      Specified by:
      forceMerge in class Engine
      Throws:
      EngineException
      IOException
    • acquireLastIndexCommit

      public Engine.IndexCommitRef acquireLastIndexCommit(boolean flushFirst) throws EngineException
      Description copied from class: Engine
      Snapshots the most recent index and returns a handle to it. If needed will try and "commit" the lucene index to make sure we have a "fresh" copy of the files to snapshot.
      Specified by:
      acquireLastIndexCommit in class Engine
      Parameters:
      flushFirst - indicates whether the engine should flush before returning the snapshot
      Throws:
      EngineException
    • acquireSafeIndexCommit

      public Engine.IndexCommitRef acquireSafeIndexCommit() throws EngineException
      Description copied from class: Engine
      Snapshots the most recent safe index commit from the engine.
      Specified by:
      acquireSafeIndexCommit in class Engine
      Throws:
      EngineException
    • getSafeCommitInfo

      public SafeCommitInfo getSafeCommitInfo()
      Specified by:
      getSafeCommitInfo in class Engine
      Returns:
      a summary of the contents of the current safe commit
    • maybeFailEngine

      protected boolean maybeFailEngine(String source, Exception e)
      Description copied from class: Engine
      Check whether the engine should be failed
      Overrides:
      maybeFailEngine in class Engine
    • getLastCommittedSegmentInfos

      public org.apache.lucene.index.SegmentInfos getLastCommittedSegmentInfos()
      Specified by:
      getLastCommittedSegmentInfos in class Engine
    • writerSegmentStats

      protected final void writerSegmentStats(SegmentsStats stats)
      Overrides:
      writerSegmentStats in class Engine
    • getIndexBufferRAMBytesUsed

      public long getIndexBufferRAMBytesUsed()
      Description copied from class: Engine
      How much heap is used that would be freed by a refresh. This includes both the current memory being freed and any remaining memory usage that could be freed, e.g., by refreshing. Note that this may throw AlreadyClosedException.
      Specified by:
      getIndexBufferRAMBytesUsed in class Engine
    • segments

      public List<Segment> segments()
      Description copied from class: Engine
      The list of segments in the engine.
      Specified by:
      segments in class Engine
    • closeNoLock

      protected final void closeNoLock(String reason, CountDownLatch closedLatch)
      Description copied from class: Engine
      Closes the engine without acquiring any refs or locks. The caller should either have changed Engine.isClosing from false to true or else must hold the Engine.failEngineLock. The implementation must decrement the supplied latch when done.
      Specified by:
      closeNoLock in class Engine
    • getReferenceManager

      protected final org.apache.lucene.search.ReferenceManager<ElasticsearchDirectoryReader> getReferenceManager(Engine.SearcherScope scope)
      Specified by:
      getReferenceManager in class Engine
    • activateThrottling

      public void activateThrottling()
      Description copied from class: Engine
      Request that this engine throttle incoming indexing requests to one thread. Must be matched by a later call to Engine.deactivateThrottling().
      Specified by:
      activateThrottling in class Engine
    • deactivateThrottling

      public void deactivateThrottling()
      Description copied from class: Engine
      Reverses a previous Engine.activateThrottling() call.
      Specified by:
      deactivateThrottling in class Engine
    • isThrottled

      public boolean isThrottled()
      Description copied from class: Engine
      Returns the true iff this engine is currently under index throttling.
      Specified by:
      isThrottled in class Engine
      See Also:
    • getIndexThrottleTimeInMillis

      public long getIndexThrottleTimeInMillis()
      Description copied from class: Engine
      Returns the number of milliseconds this engine was under index throttling.
      Specified by:
      getIndexThrottleTimeInMillis in class Engine
    • commitIndexWriter

      protected void commitIndexWriter(org.apache.lucene.index.IndexWriter writer, Translog translog) throws IOException
      Commits the specified index writer.
      Parameters:
      writer - the index writer to commit
      translog - the translog
      Throws:
      IOException
    • getCommitExtraUserData

      protected Map<String,String> getCommitExtraUserData()
      Allows InternalEngine extenders to return custom key-value pairs which will be included in the Lucene commit user-data. Custom user data keys can be overwritten by if their keys conflict keys used by InternalEngine.
    • onSettingsChanged

      public void onSettingsChanged()
      Overrides:
      onSettingsChanged in class Engine
    • getMergeStats

      public MergeStats getMergeStats()
      Overrides:
      getMergeStats in class Engine
    • getLocalCheckpointTracker

      protected LocalCheckpointTracker getLocalCheckpointTracker()
    • getLastSyncedGlobalCheckpoint

      public long getLastSyncedGlobalCheckpoint()
      Description copied from class: Engine
      Returns the latest global checkpoint value that has been persisted in the underlying storage (i.e. translog's checkpoint)
      Specified by:
      getLastSyncedGlobalCheckpoint in class Engine
    • getMaxSeqNo

      public long getMaxSeqNo()
      Specified by:
      getMaxSeqNo in class Engine
      Returns:
      the max issued or seen seqNo for this Engine
    • getProcessedLocalCheckpoint

      public long getProcessedLocalCheckpoint()
      Specified by:
      getProcessedLocalCheckpoint in class Engine
      Returns:
      the processed local checkpoint for this Engine
    • getPersistedLocalCheckpoint

      public long getPersistedLocalCheckpoint()
      Specified by:
      getPersistedLocalCheckpoint in class Engine
      Returns:
      the persisted local checkpoint for this Engine
    • markSeqNoAsSeen

      protected final void markSeqNoAsSeen(long seqNo)
      Marks the given seq_no as seen and advances the max_seq_no of this engine to at least that value.
    • hasBeenProcessedBefore

      protected final boolean hasBeenProcessedBefore(Engine.Operation op)
      Checks if the given operation has been processed in this engine or not.
      Returns:
      true if the given operation was processed; otherwise false.
    • getSeqNoStats

      public SeqNoStats getSeqNoStats(long globalCheckpoint)
      Specified by:
      getSeqNoStats in class Engine
      Returns:
      a SeqNoStats object, using local state and the supplied global checkpoint
    • countChanges

      public int countChanges(String source, long fromSeqNo, long toSeqNo) throws IOException
      Description copied from class: Engine
      Counts the number of operations in the range of the given sequence numbers.
      Specified by:
      countChanges in class Engine
      Parameters:
      source - the source of the request
      fromSeqNo - the start sequence number (inclusive)
      toSeqNo - the end sequence number (inclusive)
      Throws:
      IOException
      See Also:
    • newChangesSnapshot

      public Translog.Snapshot newChangesSnapshot(String source, long fromSeqNo, long toSeqNo, boolean requiredFullRange, boolean singleConsumer, boolean accessStats) throws IOException
      Description copied from class: Engine
      Creates a new history snapshot from Lucene for reading operations whose seqno in the requesting seqno range (both inclusive). This feature requires soft-deletes enabled. If soft-deletes are disabled, this method will throw an IllegalStateException.
      Specified by:
      newChangesSnapshot in class Engine
      Throws:
      IOException
    • hasCompleteOperationHistory

      public boolean hasCompleteOperationHistory(String reason, long startingSeqNo)
      Description copied from class: Engine
      Checks if this engine has every operations since startingSeqNo(inclusive) in its history (either Lucene or translog)
      Specified by:
      hasCompleteOperationHistory in class Engine
    • getMinRetainedSeqNo

      public final long getMinRetainedSeqNo()
      Returns the minimum seqno that is retained in the Lucene index. Operations whose seq# are at least this value should exist in the Lucene index.
      Specified by:
      getMinRetainedSeqNo in class Engine
      Returns:
      the minimum retained sequence number
    • acquireHistoryRetentionLock

      public Closeable acquireHistoryRetentionLock()
      Description copied from class: Engine
      Acquires a lock on the translog files and Lucene soft-deleted documents to prevent them from being trimmed
      Specified by:
      acquireHistoryRetentionLock in class Engine
    • refreshIfNeeded

      protected final void refreshIfNeeded(String source, long requestingSeqNo)
      Refresh this engine **internally** iff the requesting seq_no is greater than the last refreshed checkpoint.
    • getMaxSeenAutoIdTimestamp

      public final long getMaxSeenAutoIdTimestamp()
      Description copied from class: Engine
      Returns the maximum auto_id_timestamp of all append-only index requests have been processed by this engine or the auto_id_timestamp received from its primary shard via Engine.updateMaxUnsafeAutoIdTimestamp(long). Notes this method returns the auto_id_timestamp of all append-only requests, not max_unsafe_auto_id_timestamp.
      Overrides:
      getMaxSeenAutoIdTimestamp in class Engine
    • updateMaxUnsafeAutoIdTimestamp

      public final void updateMaxUnsafeAutoIdTimestamp(long newTimestamp)
      Description copied from class: Engine
      Forces this engine to advance its max_unsafe_auto_id_timestamp marker to at least the given timestamp. The engine will disable optimization for all append-only whose timestamp at most newTimestamp.
      Specified by:
      updateMaxUnsafeAutoIdTimestamp in class Engine
    • getMaxSeqNoOfUpdatesOrDeletes

      public long getMaxSeqNoOfUpdatesOrDeletes()
      Description copied from class: Engine
      Returns the maximum sequence number of either update or delete operations have been processed in this engine or the sequence number from Engine.advanceMaxSeqNoOfUpdatesOrDeletes(long). An index request is considered as an update operation if it overwrites the existing documents in Lucene index with the same document id.

      A note on the optimization using max_seq_no_of_updates_or_deletes: For each operation O, the key invariants are:

      1. I1: There is no operation on docID(O) with seqno that is > MSU(O) and < seqno(O)
      2. I2: If MSU(O) < seqno(O) then docID(O) did not exist when O was applied; more precisely, if there is any O' with seqno(O') < seqno(O) and docID(O') = docID(O) then the one with the greatest seqno is a delete.

      When a receiving shard (either a replica or a follower) receives an operation O, it must first ensure its own MSU at least MSU(O), and then compares its MSU to its local checkpoint (LCP). If LCP < MSU then there's a gap: there may be some operations that act on docID(O) about which we do not yet know, so we cannot perform an add. Note this also covers the case where a future operation O' with seqNo(O') > seqNo(O) and docId(O') = docID(O) is processed before O. In that case MSU(O') is at least seqno(O') and this means MSU >= seqNo(O') > seqNo(O) > LCP (because O wasn't processed yet).

      However, if MSU <= LCP then there is no gap: we have processed every operation <= LCP, and no operation O' with seqno(O') > LCP and seqno(O') < seqno(O) also has docID(O') = docID(O), because such an operation would have seqno(O') > LCP >= MSU >= MSU(O) which contradicts the first invariant. Furthermore in this case we immediately know that docID(O) has been deleted (or never existed) without needing to check Lucene for the following reason. If there's no earlier operation on docID(O) then this is clear, so suppose instead that the preceding operation on docID(O) is O': 1. The first invariant above tells us that seqno(O') <= MSU(O) <= LCP so we have already applied O' to Lucene. 2. Also MSU(O) <= MSU <= LCP < seqno(O) (we discard O if seqno(O) <= LCP) so the second invariant applies, meaning that the O' was a delete.

      Therefore, if MSU <= LCP < seqno(O) we know that O can safely be optimized with and added to lucene with addDocument. Moreover, operations that are optimized using the MSU optimization must not be processed twice as this will create duplicates in Lucene. To avoid this we check the local checkpoint tracker to see if an operation was already processed.

      Specified by:
      getMaxSeqNoOfUpdatesOrDeletes in class Engine
      See Also:
    • advanceMaxSeqNoOfUpdatesOrDeletes

      public void advanceMaxSeqNoOfUpdatesOrDeletes(long maxSeqNoOfUpdatesOnPrimary)
      Description copied from class: Engine
      A replica shard receives a new max_seq_no_of_updates from its primary shard, then calls this method to advance this marker to at least the given sequence number.
      Specified by:
      advanceMaxSeqNoOfUpdatesOrDeletes in class Engine
    • getRawFieldRange

      public ShardLongFieldRange getRawFieldRange(String field)
      Specified by:
      getRawFieldRange in class Engine
      Returns:
      a ShardLongFieldRange containing the min and max raw values of the given field for this shard if the engine guarantees these values never to change, or ShardLongFieldRange.EMPTY if this field is empty, or ShardLongFieldRange.UNKNOWN if this field's value range may change in future.
    • addFlushListener

      public void addFlushListener(Translog.Location location, ActionListener<Long> listener)
      Overrides:
      addFlushListener in class Engine
    • waitForCommitDurability

      protected void waitForCommitDurability(long generation, ActionListener<Void> listener)
    • getLastUnsafeSegmentGenerationForGets

      public long getLastUnsafeSegmentGenerationForGets()
    • createLiveVersionMapArchive

      protected LiveVersionMapArchive createLiveVersionMapArchive()
    • getLiveVersionMapArchive

      protected LiveVersionMapArchive getLiveVersionMapArchive()
    • getLiveVersionMap

      public LiveVersionMap getLiveVersionMap()
    • getPreCommitSegmentGeneration

      protected long getPreCommitSegmentGeneration()