Skip to content

Commit

Permalink
Set repo prefix to remote_store in RemotePublicationConfigurationIT.
Browse files Browse the repository at this point in the history
Signed-off-by: Swetha Guptha <[email protected]>
  • Loading branch information
Swetha Guptha committed Oct 22, 2024
1 parent 49b45cc commit 730576f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setUp() throws Exception {
}

public Settings.Builder remotePublishConfiguredNodeSetting() {
String remoteStoreNodeAttributePrefix = "remote_publication";
String remoteStoreNodeAttributePrefix = "remote_store";
String stateRepoSettingsAttributeKeyPrefix = String.format(
Locale.getDefault(),
"node.attr." + REPOSITORY_SETTINGS_ATTRIBUTE_KEY_PREFIX,
Expand All @@ -83,21 +83,23 @@ public Settings.Builder remotePublishConfiguredNodeSetting() {
String routingTableRepoTypeAttributeKey = String.format(
Locale.getDefault(),
"node.attr." + REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT,
remoteStoreNodeAttributePrefix,
ROUTING_TABLE_REPO_NAME
);
String routingTableRepoSettingsAttributeKeyPrefix = String.format(
Locale.getDefault(),
"node.attr." + REPOSITORY_SETTINGS_ATTRIBUTE_KEY_PREFIX,
remoteStoreNodeAttributePrefix,
ROUTING_TABLE_REPO_NAME
);

Settings.Builder builder = Settings.builder()
.put("node.attr." + "remote_publication.state.repository", REPOSITORY_NAME)
.put("node.attr." + "remote_store.state.repository", REPOSITORY_NAME)
.put(stateRepoTypeAttributeKey, ReloadableFsRepository.TYPE)
.put(stateRepoSettingsAttributeKeyPrefix + "location", segmentRepoPath)
.put(stateRepoSettingsAttributeKeyPrefix + prefixModeVerificationSuffix, true)
.put(REMOTE_CLUSTER_STATE_ENABLED_SETTING.getKey(), true)
.put("node.attr." + "remote_publication.routing_table.repository", ROUTING_TABLE_REPO_NAME)
.put("node.attr." + "remote_store.routing_table.repository", ROUTING_TABLE_REPO_NAME)
.put(routingTableRepoTypeAttributeKey, ReloadableFsRepository.TYPE)
.put(routingTableRepoSettingsAttributeKeyPrefix + "location", segmentRepoPath);
return builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,6 @@ private Path registerCustomRepository() {

private void verifyRestoredRepositories(Path repoPath) {
RepositoriesMetadata repositoriesMetadata = clusterService().state().metadata().custom(RepositoriesMetadata.TYPE);
assertEquals(3, repositoriesMetadata.repositories().size());
// routing repo added
assertEquals(4, repositoriesMetadata.repositories().size()); // includes remote store repo as well
assertTrue(SYSTEM_REPOSITORY_SETTING.get(repositoriesMetadata.repository(REPOSITORY_NAME).settings()));
Expand Down

0 comments on commit 730576f

Please sign in to comment.