Skip to content

Commit

Permalink
Using RemoteDirectory#delete to clear all segments during migration
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna committed Jan 14, 2025
1 parent b359dd8 commit 86c6e1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5031,7 +5031,7 @@ public void deleteTranslogFilesFromRemoteTranslog() throws IOException {
*/
public void deleteRemoteStoreContents() throws IOException {
deleteTranslogFilesFromRemoteTranslog();
getRemoteDirectory().deleteStaleSegments(0);
getRemoteDirectory().delete();
}

public void syncTranslogFilesFromRemoteTranslog() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ private boolean deleteIfEmpty() throws IOException {
return delete();
}

private boolean delete() {
public boolean delete() {
try {
remoteDataDirectory.delete();
remoteMetadataDirectory.delete();
Expand Down

0 comments on commit 86c6e1c

Please sign in to comment.