You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to do this work properly, the checkers and transfers need to be unified into a single datastructure. They need to be properly reference counted.
If a transfer is started, then if a checker is started on the same file then it should return the existing transfer but update the tag while the checker is running.
How to use GitHub
Please use the 👍 reaction to show that you are affected by the same issue.
Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
Subscribe to receive notifications on status change and new comments.
Just wanted to mention, in case it's related to the work you're planning here, that it would be really helpful for future bisync work to have an easy way to access a complete list of transfers. Similar to accounting.Stats(ctx).Transferred(), but that one is limited to MaxCompletedTransfers (100) and doesn't include modtime or hash. My hope is to use this to avoid having to re-list each fs at the end of a bisync run to find out what happened during the syncCopyMove operations, as re-listing is more expensive and error-prone.
If this maybe already exists and I'm missing it, please let me know 😃 I see how to access the total number of transfers/errors, but we would need a list to reconcile it with the initial directory listings to build the "after" snapshot. If keeping the full transfer list in memory is a concern, we could potentially work with just a list of errored transfers (and infer that anything not on this list was successful and now matches what we passed in.) But this is not entirely foolproof, as it leaves open the possibility that files changed in between the listing and copying.
Just wanted to mention, in case it's related to the work you're planning here, that it would be really helpful for future bisync work to have an easy way to access a complete list of transfers. Similar to accounting.Stats(ctx).Transferred(), but that one is limited to MaxCompletedTransfers (100) and doesn't include modtime or hash. My hope is to use this to avoid having to re-list each fs at the end of a bisync run to find out what happened during the syncCopyMove operations, as re-listing is more expensive and error-prone.
That isn't quite what is under discussion here, but what I think you want is something like we have for operations.Check where you can pass in io.Writers to have the file names written to.
type CheckOpt struct {
Fdst, Fsrc fs.Fs // fses to check
Check checkFn // function to use for checking
OneWay bool // one way only?
Combined io.Writer // a file with file names with leading sigils
MissingOnSrc io.Writer // files only in the destination
MissingOnDst io.Writer // files only in the source
Match io.Writer // matching files
Differ io.Writer // differing files
Error io.Writer // files with errors of some kind
}
If you read the docs for rclone check you'll see the bits about outputting file names to files. People have asked for exactly this for sync/copy/move and I think this internal inteface would suit your requirements too.
I should probably change the io.Writer into a func(remote string) error to explicitly say it will be called with a path each time. We'd need a way of signalling high level retries also as the functions potentially get called each high level retry.
what I think you want is something like we have for operations.Check where you can pass in io.Writers to have the file names written to.
Yes, this would be great! (I used this recently in 5ca61ab.) For bisync purposes I think we'd also need the size, modtime, and hash in addition to the list of names (at least to the extent that syncCopyMove already has this info -- and I think it does, as that's how it knows if a file is "corrupted on transfer".)
But apologies for interrupting your unrelated ticket -- I'll get out of it now 🙂
This is definitely needed. I was quite confused when I had --progress only show 8 transfers (which I discovered were actually checkers) when I had specified 20 transfers on the command line, and was slowing down the sync progress unnecessarily.
Activity
nielash commentedon Aug 25, 2023
Just wanted to mention, in case it's related to the work you're planning here, that it would be really helpful for future
bisyncwork to have an easy way to access a complete list of transfers. Similar toaccounting.Stats(ctx).Transferred(), but that one is limited toMaxCompletedTransfers(100) and doesn't includemodtimeorhash. My hope is to use this to avoid having to re-list each fs at the end of a bisync run to find out what happened during thesyncCopyMoveoperations, as re-listing is more expensive and error-prone.If this maybe already exists and I'm missing it, please let me know 😃 I see how to access the total number of transfers/errors, but we would need a list to reconcile it with the initial directory listings to build the "after" snapshot. If keeping the full transfer list in memory is a concern, we could potentially work with just a list of errored transfers (and infer that anything not on this list was successful and now matches what we passed in.) But this is not entirely foolproof, as it leaves open the possibility that files changed in between the listing and copying.
ncw commentedon Aug 26, 2023
@nielash wrote:
That isn't quite what is under discussion here, but what I think you want is something like we have for
operations.Checkwhere you can pass inio.Writers to have the file names written to.If you read the docs for rclone check you'll see the bits about outputting file names to files. People have asked for exactly this for sync/copy/move and I think this internal inteface would suit your requirements too.
I should probably change the
io.Writerinto afunc(remote string) errorto explicitly say it will be called with a path each time. We'd need a way of signalling high level retries also as the functions potentially get called each high level retry.nielash commentedon Sep 5, 2023
Yes, this would be great! (I used this recently in 5ca61ab.) For bisync purposes I think we'd also need the
size,modtime, andhashin addition to the list of names (at least to the extent thatsyncCopyMovealready has this info -- and I think it does, as that's how it knows if a file is "corrupted on transfer".)But apologies for interrupting your unrelated ticket -- I'll get out of it now 🙂
ncw commentedon Sep 5, 2023
@nielash do you want to make a new issue about this?
nielash commentedon Sep 6, 2023
Done 👍 #7282
eharris commentedon Jun 11, 2024
This is definitely needed. I was quite confused when I had --progress only show 8 transfers (which I discovered were actually checkers) when I had specified 20 transfers on the command line, and was slowing down the sync progress unnecessarily.