Module org.elasticsearch.server
Package org.elasticsearch.index.engine
Class LuceneSyntheticSourceChangesSnapshot
java.lang.Object
org.elasticsearch.index.engine.SearchBasedChangesSnapshot
org.elasticsearch.index.engine.LuceneSyntheticSourceChangesSnapshot
- All Implemented Interfaces:
Closeable,AutoCloseable,Translog.Snapshot
A
SearchBasedChangesSnapshot that utilizes a synthetic field loader to rebuild the recovery source.
This snapshot is activated when IndexSettings.RECOVERY_USE_SYNTHETIC_SOURCE_SETTING
is enabled on the underlying index.
The maxMemorySizeInBytes parameter limits the total size of uncompressed _sources
loaded into memory during batch retrieval.-
Field Summary
Fields inherited from class org.elasticsearch.index.engine.SearchBasedChangesSnapshot
DEFAULT_BATCH_SIZE, fromSeqNo, requiredFullRange, searchBatchSize, toSeqNoFields inherited from interface org.elasticsearch.index.translog.Translog.Snapshot
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionLuceneSyntheticSourceChangesSnapshot(MapperService mapperService, Engine.Searcher engineSearcher, int searchBatchSize, long maxMemorySizeInBytes, long fromSeqNo, long toSeqNo, boolean requiredFullRange, boolean accessStats, IndexVersion indexVersionCreated) -
Method Summary
Modifier and TypeMethodDescriptionprotected Translog.OperationAbstract method for retrieving the next operation.intThe number of operations have been skipped (overridden or trimmed) in the snapshot so far.Methods inherited from class org.elasticsearch.index.engine.SearchBasedChangesSnapshot
addSyntheticFields, assertDocSoftDeleted, close, leaves, next, nextTopDocs, setNextSyntheticFieldsReader, totalOperations
-
Constructor Details
-
LuceneSyntheticSourceChangesSnapshot
public LuceneSyntheticSourceChangesSnapshot(MapperService mapperService, Engine.Searcher engineSearcher, int searchBatchSize, long maxMemorySizeInBytes, long fromSeqNo, long toSeqNo, boolean requiredFullRange, boolean accessStats, IndexVersion indexVersionCreated) throws IOException - Throws:
IOException
-
-
Method Details
-
skippedOperations
public int skippedOperations()Description copied from interface:Translog.SnapshotThe number of operations have been skipped (overridden or trimmed) in the snapshot so far. UnlikeTranslog.Snapshot.totalOperations(), this value is updated each time afterTranslog.Snapshot.next()) is called. -
nextOperation
Description copied from class:SearchBasedChangesSnapshotAbstract method for retrieving the next operation. Should be implemented by subclasses.- Specified by:
nextOperationin classSearchBasedChangesSnapshot- Returns:
- The next Translog.Operation in the snapshot.
- Throws:
IOException- If an I/O error occurs.
-