]> arthur.barton.de Git - bup.git/commit
hashsplit.py: okay, *really* fix BLOB_MAX.
authorAvery Pennarun <apenwarr@gmail.com>
Sun, 20 Feb 2011 04:33:36 +0000 (20:33 -0800)
committerAvery Pennarun <apenwarr@gmail.com>
Sun, 20 Feb 2011 05:38:28 +0000 (21:38 -0800)
commit84f4cf05c68f0fa3e594542520e9c71e459bfb66
tree6dadd23e354c1930376d2e870a7dfe14560de82a
parent7976e29118c97dd1f8dc3a733e8a74f6a95c0431
hashsplit.py: okay, *really* fix BLOB_MAX.

In some conditions, we were still splitting into blobs larger than BLOB_MAX.
Fix that too.

Unfortunately adding an assertion about it in the 'bup split' main loop
slows things down by a measurable amount, so I can't easily add that to
prevent this from happening by accidenta again in the future.

After implementing this, it looks like 8192 (typical blob size) times two
isn't big enough to prevent this from kicking in in "normal" cases; let's
use 4x instead.  In my test file, we exceed this maximum much less.  (Every
time we exceed BLOB_MAX, it means the bupsplit algorithm isn't working, so
we won't be deduplicating as effectively.  So we want that to be rare.)

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/hashsplit.py