Skip to content

Commit 265b0c4

Browse files
committed
Removing repo consitency check for remote store it as we cant delete system repo
Signed-off-by: Dharmesh 💤 <sdharms@amazon.com>
1 parent d88a3ef commit 265b0c4

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

server/src/internalClusterTest/java/org/opensearch/remotestore/AbstractRemoteStoreMockRepositoryIntegTestCase.java

+7-8
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT;
3434
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_SEGMENT_REPOSITORY_NAME_ATTRIBUTE_KEY;
3535
import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.REMOTE_STORE_TRANSLOG_REPOSITORY_NAME_ATTRIBUTE_KEY;
36-
import static org.opensearch.test.hamcrest.OpenSearchAssertions.assertAcked;
3736

3837
public abstract class AbstractRemoteStoreMockRepositoryIntegTestCase extends AbstractSnapshotIntegTestCase {
3938

@@ -107,13 +106,11 @@ public Settings buildRemoteStoreNodeAttributes(Path repoLocation, double ioFailu
107106
.build();
108107
}
109108

110-
protected void deleteRepo() {
111-
logger.info("--> Deleting all the indices");
112-
internalCluster().wipeIndices("_all");
113-
logger.info("--> Deleting the repository={}", REPOSITORY_NAME);
114-
assertAcked(clusterAdmin().prepareDeleteRepository(REPOSITORY_NAME));
115-
logger.info("--> Deleting the repository={}", TRANSLOG_REPOSITORY_NAME);
116-
assertAcked(clusterAdmin().prepareDeleteRepository(TRANSLOG_REPOSITORY_NAME));
109+
protected void cleanupRepo() {
110+
logger.info("--> Cleanup the repository={}", REPOSITORY_NAME);
111+
clusterAdmin().prepareCleanupRepository(REPOSITORY_NAME).execute().actionGet();
112+
logger.info("--> Cleanup the repository={}", TRANSLOG_REPOSITORY_NAME);
113+
clusterAdmin().prepareCleanupRepository(TRANSLOG_REPOSITORY_NAME).execute().actionGet();
117114
}
118115

119116
protected String setup(Path repoLocation, double ioFailureRate, String skipExceptionBlobList, long maxFailure) {
@@ -127,6 +124,8 @@ protected String setup(Path repoLocation, double ioFailureRate, String skipExcep
127124
settings.put(CLUSTER_REPLICATION_TYPE_SETTING.getKey(), ReplicationType.SEGMENT);
128125
}
129126

127+
disableRepoConsistencyCheck("Remote Store Creates System Repository");
128+
130129
internalCluster().startClusterManagerOnlyNode(settings.build());
131130
String dataNodeName = internalCluster().startDataOnlyNode(settings.build());
132131
createIndex(INDEX_NAME);

server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreBackpressureIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private void validateBackpressure(
112112
stats = stats();
113113
indexDocAndRefresh(initialSource, initialDocsToIndex);
114114
assertEquals(rejectionCount, stats.rejectionCount);
115-
deleteRepo();
115+
cleanupRepo();
116116
}
117117

118118
private RemoteSegmentTransferTracker.Stats stats() {

server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreRefreshListenerIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void testRemoteRefreshRetryOnFailure() throws Exception {
5656
logger.info("Local files = {}, Repo files = {}", sortedFilesInLocal, sortedFilesInRepo);
5757
assertTrue(filesInRepo.containsAll(filesInLocal));
5858
}, 90, TimeUnit.SECONDS);
59-
deleteRepo();
59+
cleanupRepo();
6060
}
6161

6262
public void testRemoteRefreshSegmentPressureSettingChanged() {

0 commit comments

Comments
 (0)