Skip to content

Commit

Permalink
Addressing comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shourya Dutta Biswas <[email protected]>
  • Loading branch information
shourya035 committed Jul 18, 2024
1 parent d39227b commit 06c34bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ public void completeDocRepToRemoteMigration() {
.prepareUpdateSettings()
.setPersistentSettings(
Settings.builder()
.put(REMOTE_STORE_COMPATIBILITY_MODE_SETTING.getKey(), "strict")
.put(MIGRATION_DIRECTION_SETTING.getKey(), "none")
.putNull(REMOTE_STORE_COMPATIBILITY_MODE_SETTING.getKey())
.putNull(MIGRATION_DIRECTION_SETTING.getKey())
)
.get()
.isAcknowledged()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public ClusterState execute(final ClusterState currentState) {
flow. That way we are not interfering with the usual settings update
and the cluster state mutation that comes along with it
*/
if (isCompatibilityModeChanging == true && isSwitchToStrictCompatibilityMode(request) == true) {
if (isCompatibilityModeChanging && isSwitchToStrictCompatibilityMode(request)) {
ClusterState newStateAfterIndexMdChanges = finalizeMigration(clusterState);
changed = newStateAfterIndexMdChanges != currentState;
return newStateAfterIndexMdChanges;
Expand All @@ -307,6 +307,7 @@ public ClusterState execute(final ClusterState currentState) {
public boolean validateCompatibilityModeSettingRequest(ClusterUpdateSettingsRequest request, ClusterState clusterState) {
Settings settings = Settings.builder().put(request.persistentSettings()).put(request.transientSettings()).build();
if (RemoteStoreNodeService.REMOTE_STORE_COMPATIBILITY_MODE_SETTING.exists(settings)) {
logger.info("Compat mode setting : {}", RemoteStoreNodeService.REMOTE_STORE_COMPATIBILITY_MODE_SETTING.get(settings).mode);
String value = RemoteStoreNodeService.REMOTE_STORE_COMPATIBILITY_MODE_SETTING.get(settings).mode;
validateAllNodesOfSameVersion(clusterState.nodes());
if (RemoteStoreNodeService.CompatibilityMode.STRICT.mode.equals(value)) {
Expand Down

0 comments on commit 06c34bd

Please sign in to comment.