Skip to content

Commit b4e95dc

Browse files
arteamtlrx
andauthored
Unmute FrozenSearchableSnapshotsIntegTests#testCreateAndRestorePartialSearchableSnapshot (#122831)
* Unmute `FrozenSearchableSnapshotsIntegTests#testCreateAndRestorePartialSearchableSnapshot` The underlying failure `java.lang.AssertionError: Searchable snapshot directory does not support the operation [createOutput` was fixed in #122006. The automation bot was too aggressive in re-opening this issue. Resolve #122693 * Add a check for the CLOSED state along with STOPPED * Update x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/cache/full/CacheService.java Co-authored-by: Tanguy Leroux <[email protected]> --------- Co-authored-by: Tanguy Leroux <[email protected]>
1 parent 45f0471 commit b4e95dc

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,6 @@ tests:
315315
- class: org.elasticsearch.xpack.autoscaling.storage.ReactiveStorageIT
316316
method: testScaleWhileShrinking
317317
issue: https://github.com/elastic/elasticsearch/issues/122119
318-
- class: org.elasticsearch.xpack.searchablesnapshots.FrozenSearchableSnapshotsIntegTests
319-
method: testCreateAndRestorePartialSearchableSnapshot
320-
issue: https://github.com/elastic/elasticsearch/issues/122693
321318
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
322319
method: testSearchWithRandomDisconnects
323320
issue: https://github.com/elastic/elasticsearch/issues/122707

x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/cache/full/CacheService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ private void ensureLifecycleStarted() {
245245
final Lifecycle.State state = lifecycleState();
246246
assert state != Lifecycle.State.INITIALIZED : state;
247247
if (state != Lifecycle.State.STARTED) {
248-
if (state == Lifecycle.State.STOPPED) {
249-
throw new AlreadyClosedException("Failed to read data from cache: cache service is stopped");
248+
if (state == Lifecycle.State.STOPPED || state == Lifecycle.State.CLOSED) {
249+
throw new AlreadyClosedException("Failed to read data from cache: cache service is [" + state + ']');
250250
} else {
251251
throw new IllegalStateException("Failed to read data from cache: cache service is not started [" + state + "]");
252252
}

0 commit comments

Comments
 (0)