Skip to content

Commit

Permalink
Allow plugin thread pools to perform blob operations (elastic#102277)
Browse files Browse the repository at this point in the history
Add thread names which are used by the stateless plugin.
  • Loading branch information
Tim-Brooks authored Nov 16, 2023
1 parent 7e555da commit fc08145
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ public abstract class BlobStoreRepository extends AbstractLifecycleComponent imp

protected final ThreadPool threadPool;

public static final String STATELESS_SHARD_THREAD_NAME = "stateless_shard";
public static final String STATELESS_TRANSLOG_THREAD_NAME = "stateless_translog";

public static final String SNAPSHOT_PREFIX = "snap-";

public static final String INDEX_FILE_PREFIX = "index-";
Expand Down Expand Up @@ -1975,7 +1978,14 @@ public long getRestoreThrottleTimeInNanos() {
}

protected void assertSnapshotOrGenericThread() {
assert ThreadPool.assertCurrentThreadPool(ThreadPool.Names.SNAPSHOT, ThreadPool.Names.SNAPSHOT_META, ThreadPool.Names.GENERIC);
// The Stateless plugin adds custom thread pools for object store operations
assert ThreadPool.assertCurrentThreadPool(
ThreadPool.Names.SNAPSHOT,
ThreadPool.Names.SNAPSHOT_META,
ThreadPool.Names.GENERIC,
STATELESS_SHARD_THREAD_NAME,
STATELESS_TRANSLOG_THREAD_NAME
);
}

@Override
Expand Down

0 comments on commit fc08145

Please sign in to comment.