Skip to content

Commit

Permalink
[FLINK-37021][state/forst] Support reusing files in LEGACY recovery m…
Browse files Browse the repository at this point in the history
…ode. (#26142)
  • Loading branch information
AlexYinHan authored Feb 12, 2025
1 parent 4aacf33 commit e299645
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static DataTransferStrategy buildForRestore(
if (forStFlinkFileSystem == null
|| cpSharedFs == null
|| !forStFlinkFileSystem.getUri().equals(cpSharedFs.getUri())
|| recoveryClaimMode != RecoveryClaimMode.CLAIM) {
|| recoveryClaimMode == RecoveryClaimMode.NO_CLAIM) {
strategy =
forStFlinkFileSystem == null
? new CopyDataTransferStrategy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ static class DBFilesContainer {

Map<String, Path> dbFilePaths = new HashMap<>();

FileOwnershipDecider fileOwnershipDecider;

DBFilesContainer(Path dbLocalBase, Path dbRemoteBase) throws IOException {
realFileSystem = LocalFileSystem.getLocalFileSystem();

Expand All @@ -133,8 +131,6 @@ static class DBFilesContainer {
4096);
tmpResourcesRegistry = new CloseableRegistry();
closeableRegistry = new CloseableRegistry();

this.fileOwnershipDecider = fileOwnershipDecider;
}

private void createDbFiles(List<String> fileNames) throws IOException {
Expand Down Expand Up @@ -480,6 +476,9 @@ void testBuildingStrategyAsExpected() throws IOException {
testRestoreStrategyAsExpected(
forStFlinkFileSystem, RecoveryClaimMode.NO_CLAIM, CopyDataTransferStrategy.class);

testRestoreStrategyAsExpected(
forStFlinkFileSystem, RecoveryClaimMode.LEGACY, ReusableDataTransferStrategy.class);

testRestoreStrategyAsExpected(
null, RecoveryClaimMode.CLAIM, CopyDataTransferStrategy.class);

Expand Down

0 comments on commit e299645

Please sign in to comment.