Skip to content

GH-40085: [C++][FS][Azure] Validate containers in AzureFileSystem::Impl::MovePaths()#40086

Merged
felipecrv merged 3 commits intoapache:mainfrom
felipecrv:azure_move_cross_container
Feb 15, 2024
Merged

GH-40085: [C++][FS][Azure] Validate containers in AzureFileSystem::Impl::MovePaths()#40086
felipecrv merged 3 commits intoapache:mainfrom
felipecrv:azure_move_cross_container

Conversation

@felipecrv
Copy link
Copy Markdown
Contributor

@felipecrv felipecrv commented Feb 14, 2024

Rationale for this change

Cross container moves aren't supported yet (and might never be).

What changes are included in this PR?

  • Check that containers are the same before calling a Rename that assumes src and dest are on the same container

Are these changes tested?

Yes, new tests were added.

@felipecrv felipecrv requested a review from kou February 14, 2024 23:41
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #40085 has been automatically assigned in GitHub to PR creator.

@felipecrv
Copy link
Copy Markdown
Contributor Author

@Tom-Newton

@felipecrv felipecrv force-pushed the azure_move_cross_container branch from b44d92c to c51c3d9 Compare February 15, 2024 00:20
@felipecrv felipecrv force-pushed the azure_move_cross_container branch from c51c3d9 to 9f98d8f Compare February 15, 2024 00:44
Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

Comment on lines +1255 to +1256
another_container + "/path"),
fs()->Move(data.ObjectPath(), another_container + "/path"));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you use ConcatAbstractPath()?

Suggested change
another_container + "/path"),
fs()->Move(data.ObjectPath(), another_container + "/path"));
ConcatAbstractPath(another_container, "path")),
fs()->Move(data.ObjectPath(), ConcatAbstractPath(another_container, "path")));

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Feb 15, 2024
@felipecrv felipecrv merged commit 621f707 into apache:main Feb 15, 2024
@felipecrv felipecrv removed the awaiting merge Awaiting merge label Feb 15, 2024
@felipecrv felipecrv deleted the azure_move_cross_container branch February 15, 2024 12:23
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 621f707.

There was 1 benchmark result with an error:

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…em::Impl::MovePaths() (apache#40086)

### Rationale for this change

Cross container moves aren't supported yet (and might never be).

### What changes are included in this PR?

 - Check that containers are the same before calling a `Rename` that assumes `src` and `dest` are on the same container

### Are these changes tested?

Yes, new tests were added.
* Closes: apache#40085

Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Signed-off-by: Felipe Oliveira Carvalho <felipekde@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C++][FS][Azure] AzureFileSystem::Move() broken when paths are from separate containers

2 participants