-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reject multiple data paths on frozen capable nodes (#71896)
Nodes with a frozen cache no longer supports multiple data paths. This simplifies cache sizing and avoids the need to support multiple cache files. Relates #71844
- Loading branch information
1 parent
59c364c
commit 67c748e
Showing
17 changed files
with
672 additions
and
530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...g/elasticsearch/xpack/searchablesnapshots/BaseFrozenSearchableSnapshotsIntegTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
package org.elasticsearch.xpack.searchablesnapshots; | ||
|
||
import org.elasticsearch.cluster.node.DiscoveryNode; | ||
import org.elasticsearch.common.settings.Settings; | ||
import org.elasticsearch.common.unit.ByteSizeUnit; | ||
import org.elasticsearch.common.unit.ByteSizeValue; | ||
import org.elasticsearch.xpack.searchablesnapshots.cache.shared.FrozenCacheService; | ||
|
||
public class BaseFrozenSearchableSnapshotsIntegTestCase extends BaseSearchableSnapshotsIntegTestCase { | ||
@Override | ||
protected boolean forceSingleDataPath() { | ||
return true; | ||
} | ||
|
||
@Override | ||
protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) { | ||
Settings.Builder builder = Settings.builder().put(super.nodeSettings(nodeOrdinal, otherSettings)); | ||
if (DiscoveryNode.canContainData(otherSettings)) { | ||
builder.put( | ||
FrozenCacheService.SNAPSHOT_CACHE_SIZE_SETTING.getKey(), | ||
rarely() | ||
? randomBoolean() | ||
? new ByteSizeValue(randomIntBetween(1, 10), ByteSizeUnit.KB) | ||
: new ByteSizeValue(randomIntBetween(1, 1000), ByteSizeUnit.BYTES) | ||
: new ByteSizeValue(randomIntBetween(1, 10), ByteSizeUnit.MB) | ||
); | ||
} | ||
|
||
return builder.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.