Forbid snapshot access on applier thread (#56044)

This commit strengthens the assertion about which threads may access a blob
store to exclude the cluster applier thread, since we no longer need to do so.

Relates #50999
This commit is contained in:
David Turner 2020-05-05 13:27:23 +01:00
parent 2d7899c83c
commit 40ea0eabd9
1 changed files with 0 additions and 5 deletions

View File

@ -7,7 +7,6 @@ package org.elasticsearch.index.store;
import org.apache.lucene.store.BufferedIndexInput; import org.apache.lucene.store.BufferedIndexInput;
import org.apache.lucene.store.IOContext; import org.apache.lucene.store.IOContext;
import org.elasticsearch.cluster.service.ClusterApplierService;
import org.elasticsearch.common.blobstore.BlobContainer; import org.elasticsearch.common.blobstore.BlobContainer;
import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot.FileInfo; import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshot.FileInfo;
import org.elasticsearch.index.snapshots.blobstore.SlicedInputStream; import org.elasticsearch.index.snapshots.blobstore.SlicedInputStream;
@ -144,10 +143,6 @@ public abstract class BaseSearchableSnapshotIndexInput extends BufferedIndexInpu
// addressing. TODO NORELEASE // addressing. TODO NORELEASE
|| threadName.contains('[' + ThreadPool.Names.FETCH_SHARD_STORE + ']') || threadName.contains('[' + ThreadPool.Names.FETCH_SHARD_STORE + ']')
// Today for as-yet-unknown reasons we sometimes try and compute the snapshot size on the cluster applier thread, which needs
// addressing. TODO NORELEASE
|| threadName.contains('[' + ClusterApplierService.CLUSTER_UPDATE_THREAD_NAME + ']')
// Unit tests access the blob store on the main test thread; simplest just to permit this rather than have them override this // Unit tests access the blob store on the main test thread; simplest just to permit this rather than have them override this
// method somehow. // method somehow.
|| threadName.startsWith("TEST-") : "current thread [" + Thread.currentThread() + "] may not read " + fileInfo; || threadName.startsWith("TEST-") : "current thread [" + Thread.currentThread() + "] may not read " + fileInfo;