Backblaze / b2-sdk-python

Python library to access B2 cloud storage.
Other
186 stars 61 forks source link

In b2sdk-2.4.0, some files are uploaded redundantly #502

Closed titus8 closed 5 months ago

titus8 commented 5 months ago

Good day.

I've discovered a curious issue in b2sdk-2.4.0 that is a regression from b2sdk-2.3.0.

When uploading the tree

    test
    |
    |---- a
    |       |---- foo (a file)
    |
    |---- "a b"
    |       |---- bar (a file)

the first time, foo and bar are uploaded as expected. Subsequent uploads will always upload bar, even if the mod time is unchanged. If the directory a is removed, the redundant uploads of bar do not occur.

I've attached a script to reproduce this issue. in issue.py, you will need to set the destination bucket and path appropriately.

I'm using Python 3.12 on a Mac M1 running macOS Sonoma 14.5. I've attached a minimum repro script.

Thanks.

b2sdk-2.4.0-issue.tgz

titus8 commented 5 months ago

Here's another example:

  test
  |
  |---- a
  |     |---- foo (a file)
  |
  |---- a.b (a file)

a.b updates unnecessarily.

mjurbanski-reef commented 5 months ago

Regression happened in #501 . We expected slight change in synchronization order, but apparently there is was a much more serious side effect that was not detected by tests.

Both regression and tests coverage will be fixed ASAP. Thank you for nicely described bug report :)

mjurbanski-reef commented 5 months ago

Fix published https://github.com/Backblaze/b2-sdk-python/releases/tag/v2.4.1

titus8 commented 5 months ago

Verified. Outstanding, thanks!