Skip to content

Commit

Permalink
Dial back the level of detail validated for the segments that are del…
Browse files Browse the repository at this point in the history
…eted

Signed-off-by: Peter Nied <petern@amazon.com>
  • Loading branch information
peternied committed Feb 15, 2024
1 parent 0dd44f7 commit d77f812
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import org.mockito.Mockito;
Expand Down Expand Up @@ -995,20 +994,6 @@ public void testDeleteStaleCommitsActualDelete() throws Exception {
.map(metadata -> metadata.split(RemoteSegmentStoreDirectory.UploadedSegmentMetadata.SEPARATOR)[1])
.collect(Collectors.toList());

final String allFilesPattern = filesToBeDeleted.stream()
.map(Pattern::quote) // Make sure filenames are matched literally
.map(file -> "(?=.*?" + file + ")") // Allow for matches in any order
.collect(Collectors.joining("", "deletedSegmentFiles=\\[", ".*\\]"));

appender.addExpectation(
new MockLogAppender.PatternSeenWithLoggerPrefixExpectation(
"Deleted file segments message",
"org.opensearch.index.store.RemoteSegmentStoreDirectory",
Level.DEBUG,
allFilesPattern
)
);

remoteSegmentStoreDirectory.init();

// popluateMetadata() adds stub to return 3 metadata files
Expand Down

0 comments on commit d77f812

Please sign in to comment.