~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 4665.3.10.

  • Committer: John Arbash Meinel
  • Date: 2009-09-03 15:23:46 UTC
  • mto: This revision was merged to the branch mainline in revision 4672.
  • Revision ID: john@arbash-meinel.com-20090903152346-wysd9b9xork5qxs5
Get a test written which exercises the 'trim' code path.

However, to get that exercised exposed that it isn't a code path we will ever
hit 'in the wild'.

Specifically, the new 'rebuild on the fly' code path says that any group less
than 75% utilized is scheduled for being rebuilt. But the 'trim' code path
only activates when we are using <50% of the block, and the last byte
is <2*percent_used. (So if we are using 30% of the block, the last byte
must be <60%, then we will trim rather than rebuild.)

Anyway, any condition under which we would trim is actually being turned into
a rebuild. So it is probably best to remove the test and the code path
during insert_record_stream.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: