Repository navigation
memory: fix dst mutating src after server-side copy - #7690
Merged
Merged
Conversation
Before this change, the Memory backend's Copy method created a dst object that referenced the src's objectData by pointer instead of making a copy. While this minimized memory usage, an unintended consequence was that subsequently mutating the src (such as changing the modtime) would inadvertently also mutate the dst, and vice versa. This change fixes the issue and adds a test.
ncw
approved these changes
Mar 26, 2024
ncw
left a comment
Member
There was a problem hiding this comment.
Looks great - thank you.
Please merge when ready.
nielash
added a commit
to nielash/rclone
that referenced
this pull request
Mar 27, 2024
This change officially adds bisync to the nightly integration tests for all backends. This will be part of giving us the confidence to take bisync out of beta. A number of fixes have been added to account for features which can differ on different backends -- for example, hash types / modtime support, empty directories, unicode normalization, and unimportant differences in log output. We will likely find that more of these are needed once we start running these with the full set of remotes. Additionally, bisync's extremely sensitive tests revealed a few bugs in other backends that weren't previously covered by other tests. Fixes for those issues have been submitted on the following separate PRs (and bisync test failures will be expected until they are merged): - rclone#7670 memory: fix deadlock in operations.Purge - rclone#7688 memory: fix incorrect list entries when rooted at subdirectory - rclone#7690 memory: fix dst mutating src after server-side copy - rclone#7692 dropbox: fix chunked uploads when size <= chunkSize Relatedly, workarounds have been put in place for the following backend limitations that are unsolvable for the time being: - rclone#3262 drive is sometimes aware of trashed files/folders when it shouldn't be - rclone#6199 dropbox can't handle emojis and certain other characters - rclone#4590 onedrive API has longstanding bug for conflictBehavior=replace in server-side copy/move
nielash
added a commit
that referenced
this pull request
Mar 27, 2024
This change officially adds bisync to the nightly integration tests for all backends. This will be part of giving us the confidence to take bisync out of beta. A number of fixes have been added to account for features which can differ on different backends -- for example, hash types / modtime support, empty directories, unicode normalization, and unimportant differences in log output. We will likely find that more of these are needed once we start running these with the full set of remotes. Additionally, bisync's extremely sensitive tests revealed a few bugs in other backends that weren't previously covered by other tests. Fixes for those issues have been submitted on the following separate PRs (and bisync test failures will be expected until they are merged): - #7670 memory: fix deadlock in operations.Purge - #7688 memory: fix incorrect list entries when rooted at subdirectory - #7690 memory: fix dst mutating src after server-side copy - #7692 dropbox: fix chunked uploads when size <= chunkSize Relatedly, workarounds have been put in place for the following backend limitations that are unsolvable for the time being: - #3262 drive is sometimes aware of trashed files/folders when it shouldn't be - #6199 dropbox can't handle emojis and certain other characters - #4590 onedrive API has longstanding bug for conflictBehavior=replace in server-side copy/move
lafkpages
pushed a commit
to lafkpages/rclone
that referenced
this pull request
Jul 20, 2026
This change officially adds bisync to the nightly integration tests for all backends. This will be part of giving us the confidence to take bisync out of beta. A number of fixes have been added to account for features which can differ on different backends -- for example, hash types / modtime support, empty directories, unicode normalization, and unimportant differences in log output. We will likely find that more of these are needed once we start running these with the full set of remotes. Additionally, bisync's extremely sensitive tests revealed a few bugs in other backends that weren't previously covered by other tests. Fixes for those issues have been submitted on the following separate PRs (and bisync test failures will be expected until they are merged): - rclone#7670 memory: fix deadlock in operations.Purge - rclone#7688 memory: fix incorrect list entries when rooted at subdirectory - rclone#7690 memory: fix dst mutating src after server-side copy - rclone#7692 dropbox: fix chunked uploads when size <= chunkSize Relatedly, workarounds have been put in place for the following backend limitations that are unsolvable for the time being: - rclone#3262 drive is sometimes aware of trashed files/folders when it shouldn't be - rclone#6199 dropbox can't handle emojis and certain other characters - rclone#4590 onedrive API has longstanding bug for conflictBehavior=replace in server-side copy/move
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this change?
Before this change, the
Memorybackend'sCopymethod created adstobject that referenced thesrc'sobjectDataby pointer instead of making a copy. While this minimized memory usage, an unintended consequence was that subsequently mutating thesrc(such as changing themodtime) would inadvertently also mutate thedst, and vice versa.This change fixes the issue and adds a test.
Was the change discussed in an issue or in the forum before?
No.
Checklist