Small change to pack to make it more robust.
If the packpos returned by the read_index() call is 4, return immediately. In this case, the very first transaction, which contains the root object, is after the pack time. This is a degenerate case, but it seems clearest to do nothing. This change eliminates an unexpected traceback in pack() that occurred frequently, but not every time, when testing on Windows. When read_index() returned 4, a seek() call in _redundant_pack() would fail with a bad argument. Add an assertion to _redundant_pack() because it should never be called with bogus arguments as a result of the other change.
Showing
Please register or sign in to comment