Skip to content

HADOOP-18012. ABFS: Using Source Path eTags for Rename Idemptonency checks - #5488

Merged
steveloughran merged 29 commits into
apache:trunkfrom
sreeb-msft:HADOOP-18012
Mar 31, 2023
Merged

steveloughran merged 29 commits into
apache:trunkfrom
sreeb-msft:HADOOP-18012

Conversation

@sreeb-msft

@sreeb-msft sreeb-msft commented Mar 17, 2023

Copy link
Copy Markdown
Contributor

RenameFilePath on its first try receives a Request timed out error with code 500. On retrying the same operation, a Source file not found (404) error is received.

This change brings in the following mitigation:
It checks whether etags remain the same before and after the retry and accordingly send an Operation Successful result, instead of source file not found. That is, if the rename actually succeeds at the backend, the original source eTag (before the operation) and the destination eTag (after the operation) should match each other. However, this logic works only in the case of HNS configurations, and files. For directories or flat namespaces, rename recovery is not attempted.

The check for whether the eTags match or not is enabled by a configuration: fs.azure.enable.rename.resilience.

The tests introduced mock the retry scenario and check correct behavior (failure/recovery) depending on whether it is HNS, FNS, directory or file, both at the FileSystem level and by unit testing the renamePath API at AbfsClient level.

Loading
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.

5 participants