Repository navigation
Conversation
Is this using ? Can you describe the workflow that causes this problem. I don't understand why you would use In general rclone prefers not to keep copying objects so you can run the command multiple times. |
|
@ncw Thanks for your response! I was using The workflow is that I'm copying/syncing to a bucket from another existing bucket that was not created with rclone and has objects that were multipart uploaded, think "backup bucket". By changing one byte in such an object and attempting to copy it to the backup bucket, you will notice that because it has the same size, it doesn't copy, even though: 1. the files are different, and 2. I specified --ignore-size. Maybe this will help understand: It should have transferred (IMHO even if --ignore-size is not specified, but this PR is about at least honoring --ignore-size). Hopefully this helps!
I must say I'm a bit surprised by that. I agree that --ignore-size is an esoteric option, but possibly not for the same reasons: I believe it should be the default. And as a user I expect rclone by default to prioritize copying the correct files before optimizing transfer, providing optimization opt-ins for people who have additional knowledge of their data (for instance if they know size changes over time, they can go with size comparison). In other words, overoptimizing to the point of incorrectness seems very weird to me. |
|
If it helps, s3cmd does want to copy. |
|
ping @ncw PTAL 🙏🤗 |
|
@ncw could you have a look to see if there's any objections against this change? |
40e474c to
095c7bd
Compare
|
@tiborvass |
|
This PR is unfortunately broken by me (can be revived by ivandeex@6066adf) and forgotten by its authors. However it serves as a good example of uncontrolled complexity (see #4793 (comment)) of the "equal" method and around, which used to grow organically in response to the stream of change detection feature requests, often serving contradictory user requirements such as consistency (this PR #4011 (comment)), cost savings (see #2889 (comment)) and many others (sometimes unexplained ;)), blurring the line between "bug" ang "feature". This in turn has led to a number of change-related CLI flags (see https://rclone.org/flags), some of them having negative (no-check), conditional (x-if-y) or even double-negative (noignore) names, which interact in exotic ways with 30+ supported backends (https://rclone.org/overview#features) and their (in)ability to provide required traits. On top of that we have filtering flags and two unobviously different commands: In the end we might expect that any behavior can be requested, even that that feels esoteric or illogical. This probably calls for some brushing (#4793 (comment)):
This seems like a big effort covering <5% of user base so I'm not sure. @ncw ? |
I think we could inventory the flags to see where we are at. However I don't want to break backwards compatibility, so if we want to change stuff then we need to do so carefull! The User demand is how rclone has gained new features, though we need to be careful to push back on ones which aren't of general interest.
Indeed. N-flags * N-providers * N-options-per-provider is a big number.
More docs for
Yes, users want to get their stuff done, it is our job to keep rclone consistent!
I'll just copy the comment here
I think that is a good plan to control the complexity.
Making a generalised solution will mean that advanced users will have somewhere to go when then need to get stuff done, but hopefully a much smaller subset of flags will cover the main use cases (eg --checksum, --size-only). I like that idea. We could implement it then deprecate flags which we don't like. (You can hide flags so they still work but are hidden).
Great idea. I especially like your moratorium on adding more complexity to what we've got already. Do you want to make an issue, then we can think about all the things which might need to be controlled? |
What is the purpose of this change?
This fixes a bug where two different but same-sized objects that cannot be compared
with checksum are considered equal even though --checksum and --ignore-size are
specified.
To test this, use an existing s3 bucket on AWS that was not created with rclone and
that has objects uploaded with multi-part (ETAG != MD5) then try to sync from it to
some destination, twice in a row. The second time it should copy again the objects
that do not have a hash, instead of relying on --size-only behavior.
If someone can add a test for this case, I'd appreciate it!
IMHO, --ignore-size (and not --size-only) should be the default fallback, when
--checksum is specified.
Was the change discussed in an issue or in the forum before?
Unsure.
Checklist