Browse Source

Change tier preference for shared_cache searchable snapshots to frozen only (#70786)

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
Lee Hinman 4 years ago
parent
commit
e900081933

+ 2 - 2
x-pack/plugin/searchable-snapshots/src/main/java/org/elasticsearch/xpack/searchablesnapshots/SearchableSnapshots.java

@@ -222,14 +222,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 + "]");
         }