Package org.opensearch.index
Class ShardIndexingPressure
java.lang.Object
org.opensearch.index.IndexingPressure
org.opensearch.index.ShardIndexingPressure
public class ShardIndexingPressure extends IndexingPressure
Shard Indexing Pressure is a framework level artefact build on top of IndexingPressure to track incoming indexing request, per shard.
The interfaces provided by this class will be used by Transport Action layers to start accounting for an incoming request.
Interfaces returns Releasable which when triggered will release the acquired accounting tokens values and also
perform necessary actions such as throughput evaluation once the request completes.
Consumers of these interfaces are expected to trigger close on releasable, reliably for consistency.
Overall ShardIndexingPressure provides:
1. Memory Accounting at shard level. This can be enabled/disabled based on dynamic setting.
2. Memory Accounting at Node level. Tracking is done using the IndexingPressure artefacts to support feature seamless toggling.
3. Interfaces to access the statistics for shard trackers.
-
Field Summary
Fields inherited from class org.opensearch.index.IndexingPressure
coordinatingRejections, currentCombinedCoordinatingAndPrimaryBytes, currentCoordinatingBytes, currentPrimaryBytes, currentReplicaBytes, MAX_INDEXING_BYTES, primaryAndCoordinatingLimits, primaryRejections, replicaLimits, replicaRejections, totalCombinedCoordinatingAndPrimaryBytes, totalCoordinatingBytes, totalPrimaryBytes, totalReplicaBytes
-
Method Summary
Modifier and Type Method Description boolean
isShardIndexingPressureEnabled()
Releasable
markCoordinatingOperationStarted(ShardId shardId, long bytes, boolean forceExecution)
Releasable
markPrimaryOperationLocalToCoordinatingNodeStarted(ShardId shardId, long bytes)
Releasable
markPrimaryOperationStarted(ShardId shardId, long bytes, boolean forceExecution)
Releasable
markReplicaOperationStarted(ShardId shardId, long bytes, boolean forceExecution)
ShardIndexingPressureStats
shardStats(CommonStatsFlags statsFlags)
Methods inherited from class org.opensearch.index.IndexingPressure
getCurrentCombinedCoordinatingAndPrimaryBytes, getCurrentCoordinatingBytes, getCurrentPrimaryBytes, getCurrentReplicaBytes, markCoordinatingOperationStarted, markPrimaryOperationLocalToCoordinatingNodeStarted, markPrimaryOperationStarted, markReplicaOperationStarted, stats
-
Method Details
-
markCoordinatingOperationStarted
public Releasable markCoordinatingOperationStarted(ShardId shardId, long bytes, boolean forceExecution) -
markPrimaryOperationLocalToCoordinatingNodeStarted
-
markPrimaryOperationStarted
-
markReplicaOperationStarted
-
shardStats
-
isShardIndexingPressureEnabled
public boolean isShardIndexingPressureEnabled()
-