Skip to content

Commit

Permalink
[7.x] Change tier preference for shared_cache searchable snapshots to…
Browse files Browse the repository at this point in the history
… frozen only (#70786) (#70818)

We recently deprecated the ability to set the shared cache outside of the frozen tier, and
eventually will only allow shared_cache searchable snapshots to existing on nodes with the
`data_frozen` role.

This commit changes those searchable snapshots to only be allocated on the
frozen tier, rather than an ordered list of frozen/cold/warm/hot.

Relates to #70341
  • Loading branch information
dakrone authored Mar 24, 2021
1 parent ea3e745 commit 322f675
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,14 @@ public class SearchableSnapshots extends Plugin implements IndexStorePlugin, Eng
/**
* Returns the preference for new searchable snapshot indices. When
* performing a full mount the preference is cold - warm - hot. When
* performing a partial mount the preference is frozen - cold - warm - hot.
* performing a partial mount the preference is only frozen
*/
public static String getDataTiersPreference(MountSearchableSnapshotRequest.Storage type) {
switch (type) {
case FULL_COPY:
return String.join(",", DataTier.DATA_COLD, DataTier.DATA_WARM, DataTier.DATA_HOT);
case SHARED_CACHE:
return String.join(",", DataTier.DATA_FROZEN, DataTier.DATA_COLD, DataTier.DATA_WARM, DataTier.DATA_HOT);
return DataTier.DATA_FROZEN;
default:
throw new IllegalArgumentException("unknown searchable snapshot type [" + type + "]");
}
Expand Down

0 comments on commit 322f675

Please sign in to comment.