[MERGE] Set allow_optimize=False when spilling btree content to disk
John Arbash Meinel
john at arbash-meinel.com
Fri Mar 20 15:01:15 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> Robert Collins has voted approve.
> Status is now: Approved
> Comment:
> Given you added the allow_optimise stuff in the first place... I'm not
> entirely sure that tapping out on it being inaccessible for tests makes
> that much sense. Certainly agree that its the right thing to do and the
> code looks ok.
Well, I remember asking for help on the testing when I wrote it, and we
came up with roughly the current answer. (Add a test that the flag gets
set at the appropriate time.)
The difficulty in my head is how to interrupt the stack to see what is
going on. (How do you test that pack is passing the 'set_optimize=True'
flag)
Going further, 'set_optimize' changes the behavior of a compressor,
which is not specifically guaranteed to be 'stable', especially across
versions of python, etc. So I can't just check that when the value is
set to true, the bytes exactly match X versus Y...
If you have pointers on how it could be tested, I'm interested to hear
them. In the mean-time, it was maybe 5 minutes to write the fix, but
would be 2-4 hours to write something that might test it. (Though I can
understand that if it regresses it is Y time before we even notice, and
potentially 8+ hours if we have to debug and fix it.)
The balance between effort to test and effort to implement seemed a bit
off, though I'm open to hearing ways to improve this.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAknDr7sACgkQJdeBCYSNAANiyACeJhaBlDFGSrU7hRFfap76TtDv
xogAoMOzjRKJo8qw55gmgSEO/GDyDsEN
=3RkK
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list