[merge] Weave checks sha1 sum while extracting

John A Meinel john at arbash-meinel.com
Mon Dec 19 17:46:52 GMT 2005


Right now, every text inside of a weave has a sha1 sum, but we never
check it. Attached is a patch which checks the sha1 sum every time we
extract a text.
The interesting thing about our current weave code, is that doing the
sha1 only adds a negligible amount of time. Sha1 is pretty fast, much
faster than iterating over our weave format.

I ran "bzr selftest" twice, with and without the change, and it runs in
the same amount of time (114s,111s without vs 112s,113s with).
I also ran bzr check twice

I really think this should be included. The overhead is low, and it
means we actually do something about the sha1 sums, rather than only at
"bzr check" time. (which until now they were actually ignored as well,
only the inventory => text sha1 was ever checked).

I also ran "bzr check" and the difference was 27min without, and 28min
with. So again, the overhead is minimal.

I've added the change to my jam-integration branch. Because the
performance hit is negligible, and it does improve the integrity checking.

John
=:->
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: weave-checks-sha1sum.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20051219/b4b25709/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051219/b4b25709/attachment.pgp 


More information about the bazaar mailing list