Skip to content

lib/batcher: log when committing uploads has finished - fixes #5564 - #10057

Merged
ncw merged 1 commit into
rclone:masterfrom
hsdfat:batcher-log-commit-done-5564
Oct 13, 2026
Merged

ncw merged 1 commit into
rclone:masterfrom
hsdfat:batcher-log-commit-done-5564

Conversation

@hsdfat

@hsdfat hsdfat commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

What does this change do?

When the batcher shuts down it logs Committing uploads - please wait... and then nothing more, so the log looks as if rclone stopped part way through. As suggested in the issue, this adds a new message after b.wg.Wait(), once the outstanding batches have been committed. The existing message is unchanged:

INFO  : Dropbox root 'x': Committing uploads - please wait...
INFO  : Dropbox root 'x': Committing uploads - done
  • The new message is logged at INFO, like the existing one.
  • The batcher now lives in lib/batcher, so the change covers both dropbox and googlephotos.
  • "done" means the commit has finished. If a batch failed, that error is still logged above this line, as before.

The bisync test log filter drops the existing message, so I added the new one next to it. Without that, the bisync golden tests would fail on dropbox.

Testing

  • TestBatcherShutdownLog commits an item to an async batcher and shuts it down. It checks that the new message is logged after the batch has been committed. It fails on master.
  • These pass: go build ./..., make quicktest, go test ./lib/batcher/ ./cmd/bisync/, go test -race ./lib/batcher/, go vet and golangci-lint run ./lib/batcher/... ./cmd/bisync/....
  • I don't have dropbox or Google Photos accounts, so I haven't run test_all against them. The change is in the shared batcher and is covered by the test above.

Linked issue

Fixes #5564

Checklist

  • This change is trivial OR it has been discussed and agreed in the linked issue.
  • I have read the contribution guidelines.
  • (If I used AI tools to help write this code) I have read and understood the AI-assisted contributions guidance, and I have tested and take ownership of this change myself.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate. (No doc change needed: log output only.)
  • All commit messages are in house style.
  • (Backend changes only) test_all passes for this backend. n/a, not a backend change.
  • This Pull Request is ready for review.

…5564

On shutdown the batcher logged "Committing uploads - please wait..."
but nothing once the commit had completed, so the log looked as if
rclone had stopped part way through. Log "Committing uploads - done"
when the pending batches have been committed.

This affects the backends which use the batcher, dropbox and
googlephotos.

@ncw ncw left a comment

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.

Thank you :-)

@ncw
ncw merged commit 102ef16 into rclone:master Oct 13, 2026
9 checks passed
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.

Improve sync confirmation message text for Dropbox

2 participants