Skip to content

Commit

Permalink
Addressed PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Bansi Kasundra <kasundra@amazon.com>
  • Loading branch information
kasundra07 committed Jul 11, 2023
1 parent 613d119 commit ae291cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void testDeleteMultipleShallowCopySnapshotsCase1() throws Exception {
// Deleting multiple shallow copy snapshots as part of single delete call with both partial and full copy snapshot present in the repo
// And then deleting multiple full copy snapshots as part of single delete call with both partial and shallow copy snapshots present in
// the repo
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/8610")
public void testDeleteMultipleShallowCopySnapshotsCase2() throws Exception {
disableRepoConsistencyCheck("Remote store repository is being used in the test");
FeatureFlagSetter.set(FeatureFlags.REMOTE_STORE);
Expand Down Expand Up @@ -227,6 +228,7 @@ public void testDeleteMultipleShallowCopySnapshotsCase2() throws Exception {
}

// Deleting subset of shallow and full copy snapshots as part of single delete call and then deleting all snapshots in the repo.
@AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/8610")
public void testDeleteMultipleShallowCopySnapshotsCase3() throws Exception {
disableRepoConsistencyCheck("Remote store repository is being used in the test");
FeatureFlagSetter.set(FeatureFlags.REMOTE_STORE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,6 @@ private void executeOneStaleIndexDelete(
} catch (Exception e) {
assert false : e;
logger.warn(new ParameterizedMessage("[{}] Exception during single stale index delete", metadata.name()), e);
listener.onFailure(e);
}

executeOneStaleIndexDelete(staleIndicesToDelete, remoteStoreLockManagerFactory, listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2236,6 +2236,7 @@ private void deleteSnapshotsFromRepository(
// when the repository currently have the flag disabled and we try to delete the shallow snapshots taken prior to disabling
// the flag. This can be improved by having the info whether there ever were any shallow snapshot present in this repository
// or not in RepositoryData.
// SEE https://github.com/opensearch-project/OpenSearch/issues/8610
final boolean cleanupRemoteStoreLockFiles = REMOTE_STORE_INDEX_SHALLOW_COPY.get(repository.getMetadata().settings());
if (cleanupRemoteStoreLockFiles) {
repository.deleteSnapshotsAndReleaseLockFiles(
Expand Down

0 comments on commit ae291cc

Please sign in to comment.