Class IndexingPressureService

java.lang.Object
org.opensearch.index.IndexingPressureService

@PublicApi(since="1.3.0") public class IndexingPressureService extends Object
Sets up classes for node/shard level indexing pressure. Provides abstraction and orchestration for indexing pressure interfaces when called from Transport Actions or for Stats.
Opensearch.api:
  • Constructor Details

  • Method Details

    • markCoordinatingOperationStarted

      public org.opensearch.common.lease.Releasable markCoordinatingOperationStarted(LongSupplier bytes, boolean forceExecution)
      Marks the beginning of coordinating operation for an indexing request on the node. Rejects the operation if node's memory limit is breached. Performs the node level accounting only if shard indexing pressure is disabled. Else empty releasable is returned.
      Parameters:
      bytes - memory bytes to be tracked for the current operation
      forceExecution - permits operation even if the node level memory limit is breached
      Returns:
      Releasable to mark the completion of operation and release the accounted bytes
    • markCoordinatingOperationStarted

      public org.opensearch.common.lease.Releasable markCoordinatingOperationStarted(org.opensearch.core.index.shard.ShardId shardId, LongSupplier bytes, boolean forceExecution)
      Marks the beginning of coordinating operation for an indexing request on the Shard. Rejects the operation if shard's memory limit is breached. Performs the shard level accounting only if shard indexing pressure is enabled. Else empty releasable is returned.
      Parameters:
      shardId - Shard ID for which the current indexing operation is targeted for
      bytes - memory bytes to be tracked for the current operation
      forceExecution - permits operation even if the node level memory limit is breached
      Returns:
      Releasable to mark the completion of operation and release the accounted bytes
    • markPrimaryOperationStarted

      public org.opensearch.common.lease.Releasable markPrimaryOperationStarted(org.opensearch.core.index.shard.ShardId shardId, long bytes, boolean forceExecution)
      Marks the beginning of primary operation for an indexing request. Rejects the operation if memory limit is breached. Performs the node level accounting only if shard indexing pressure is not disabled. Else shard level accounting is performed.
      Parameters:
      shardId - Shard ID for which the current indexing operation is targeted for
      bytes - memory bytes to be tracked for the current operation
      forceExecution - permits operation even if the memory limit is breached
      Returns:
      Releasable to mark the completion of operation and release the accounted bytes
    • markPrimaryOperationLocalToCoordinatingNodeStarted

      public org.opensearch.common.lease.Releasable markPrimaryOperationLocalToCoordinatingNodeStarted(org.opensearch.core.index.shard.ShardId shardId, long bytes)
      Marks the beginning of primary operation for an indexing request, when primary shard is local to the coordinator node. Rejects the operation if memory limit is breached. Performs the node level accounting only if shard indexing pressure is not disabled. Else shard level accounting is performed.
      Parameters:
      shardId - Shard ID for which the current indexing operation is targeted for
      bytes - memory bytes to be tracked for the current operation
      Returns:
      Releasable to mark the completion of operation and release the accounted bytes
    • markReplicaOperationStarted

      public org.opensearch.common.lease.Releasable markReplicaOperationStarted(org.opensearch.core.index.shard.ShardId shardId, long bytes, boolean forceExecution)
      Marks the beginning of replication operation for an indexing request. Rejects the operation if memory limit is breached. Performs the node level accounting only if shard indexing pressure is not disabled. Else shard level accounting is performed.
      Parameters:
      shardId - Shard ID for which the current indexing operation is targeted for
      bytes - memory bytes to be tracked for the current operation
      forceExecution - permits operation even if the memory limit is breached
      Returns:
      Releasable to mark the completion of operation and release the accounted bytes
    • nodeStats

      public IndexingPressureStats nodeStats()
    • shardStats

      public ShardIndexingPressureStats shardStats(CommonStatsFlags statsFlags)