Skip to content

Commit

Permalink
Set version to 2.15 for determining metadata during migration to remo…
Browse files Browse the repository at this point in the history
…te store (opensearch-project#14820)

(cherry picked from commit 3853c91)

Signed-off-by: Sandeep Kumawat <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sandeep Kumawat <[email protected]>
Signed-off-by: kkewwei <[email protected]>
  • Loading branch information
3 people authored and kkewwei committed Jul 24, 2024
1 parent 6f92bc3 commit cf1e8db
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,13 @@ public static Map<String, String> determineRemoteStoreCustomMetadataDuringMigrat
// does not support custom metadata.
// https://github.com/opensearch-project/OpenSearch/issues/13745
boolean blobStoreMetadataEnabled = false;
boolean translogMetadata = Version.CURRENT.compareTo(minNodeVersion) <= 0
boolean translogMetadata = Version.V_2_15_0.compareTo(minNodeVersion) <= 0
&& CLUSTER_REMOTE_STORE_TRANSLOG_METADATA.get(clusterSettings)
&& blobStoreMetadataEnabled;

remoteCustomData.put(IndexMetadata.TRANSLOG_METADATA_KEY, Boolean.toString(translogMetadata));

RemoteStoreEnums.PathType pathType = Version.CURRENT.compareTo(minNodeVersion) <= 0
RemoteStoreEnums.PathType pathType = Version.V_2_15_0.compareTo(minNodeVersion) <= 0
? CLUSTER_REMOTE_STORE_PATH_TYPE_SETTING.get(clusterSettings)
: RemoteStoreEnums.PathType.FIXED;
RemoteStoreEnums.PathHashAlgorithm pathHashAlgorithm = pathType == RemoteStoreEnums.PathType.FIXED
Expand Down

0 comments on commit cf1e8db

Please sign in to comment.