Skip to content

FLINK-37686 - Do not fail on NOT_OWNED deleted files - #28801

Merged
Zakelly merged 3 commits into
apache:masterfrom
francis-a:bugfix-FLINK-37686-dont-fail-on-deleted-file-checks
Jul 29, 2026
Merged

FLINK-37686 - Do not fail on NOT_OWNED deleted files#28801
Zakelly merged 3 commits into
apache:masterfrom
francis-a:bugfix-FLINK-37686-dont-fail-on-deleted-file-checks

Conversation

@francis-a

Copy link
Copy Markdown
Contributor

What is the purpose of the change

This PR aims to fix the issue documented in https://issues.apache.org/jira/browse/FLINK-37686 where remote objects cleaned up by the JM cause checkpoint failures even when the object is marked as NOT_OWNED.

Brief change log

  • Added a FileNotFoundException catch block to ForStFlinkFileSystem::listStatus
  • In this catch block we verify the object is NOT_OWNED
  • If true, we assume the JM removed this object and delete it using the FileMappingManager
  • Tests have been added to cover this case as well as ensuring the exception still bubbles up if the object is not NOT_OWNED

Verifying this change

This change added tests and can be verified as follows:

  • Added two new tests to ForStFlinkFileSystemTest, testListStatusDropsDeletedNotOwnedEntryAfterGiveUpOwnership and testListStatusStillFailsForDeletedDbOwnedFile
  • These tests cover the NOT_OWNED and verify the removed object is also removed from the FileMappingManager, the other test verifies the baseline hasn't changed for other object types

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

Was generative AI tooling used to co-author this PR?
  • Yes

Generated-by: [Claude Opus]

@flinkbot

flinkbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@AlexYinHan

Copy link
Copy Markdown
Contributor

@francis-a Thanks for the PR. LGTM. The orphan files deleted by the JM are abandoned by ForSt. They should be removed and not cause failures during a full scan. @Zakelly Could you take a look?

@Zakelly Zakelly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @francis-a thanks for the fix

@Zakelly

Zakelly commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@flinkbot run azure

@francis-a

Copy link
Copy Markdown
Contributor Author

thanks @Zakelly, do you plan on handling merging? Is there anything else I should do?

@Zakelly

Zakelly commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

thanks @Zakelly, do you plan on handling merging? Is there anything else I should do?

@francis-a yeah, I was about to merge but the CI failed. I think it's irrelevant but the CI bot is not responding to the re-run request. It would be nice if you could amend the commit and force push once, to re-trigger the CI.

@francis-a
francis-a force-pushed the bugfix-FLINK-37686-dont-fail-on-deleted-file-checks branch from f71b66e to b38fd53 Compare July 28, 2026 16:56
@francis-a

Copy link
Copy Markdown
Contributor Author

@Zakelly done

@francis-a

Copy link
Copy Markdown
Contributor Author

It doesn't look like checks are running, I'll push a minor change

@Zakelly
Zakelly merged commit 9542791 into apache:master Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants