summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-20coverage-4.0a6 compatibilityHEADmasterMichel Alexandre Salim1-1/+1
coverage 4.0a6 no longer generates .coverage file, so use -f when deleting .coverage to ensure deletion does not fail.
2015-10-25Prepare release 1.20151025larch-1.20151025Lars Wirzenius3-4/+5
2015-09-27Show dropped B-tree keys in hexadecimalLars Wirzenius2-2/+5
This is less alarming and confusing to people.
2015-07-04Change source format to 3.0 (quilt).Lars Wirzenius2-1/+2
2014-08-06Fix typo in exampleLars Wirzenius1-1/+1
Reported-by: Richard Baron Penman
2014-03-29Tweak debian/controlLars Wirzenius2-1/+11
2014-03-15Update NEWS about Antoine's fsck testsLars Wirzenius1-0/+5
2014-01-14Add fsck unit testsLars Wirzenius1-0/+244
Patch-by: Antoine Brenner
2013-11-30Prepare release 1.20131130larch-1.20131130Lars Wirzenius4-7/+12
2013-11-11Remove dead codeLars Wirzenius1-1/+0
2013-11-06Fix typo on tracing messageLars Wirzenius1-1/+1
2013-11-06Merge branch 'liw/refcount-keyerror'Lars Wirzenius4-33/+32
2013-11-06Update NEWS about bug fixesLars Wirzenius1-0/+9
2013-11-06Don't save refcount groups that haven't changedLars Wirzenius3-17/+22
This bug was exposed by a test data set provided by Rob Kendrick. Saving reference count groups would sometimes overwrite a correct saved group with one that had all counts set to zero. This would happen when the "dirty set" (node ids whose refcounts had been changed but not yet saved) contained, for example, node ids for the Nth and N+2th group, but not the N+1th group between them. The old save_refcounts logic would blithely save that group anyway, and if the in-memory reference counts happened to not be in the refcount dict, it would save zeroes instead. To fix this, save_refcounts now only saves groups that have any dirty refcounts, and skips saving a refcount group that is all clean. To do this efficiently, we need to change the encode_refcounts function signature, to get the set of keys it is to actually put into the group. This set is now computed by save_refcounts. This meant that all call sites for encode_refcounts need to be fixed as well. Luckily the fix is easy: there's only one production use of it, the rest is tests or benchmarks.
2013-11-06Delete wrong testsLars Wirzenius1-11/+0
Since we no longer treat a refcount of 0 specially, these tests no longer make any sense.
2013-11-06Fix KeyError for missing refcountLars Wirzenius1-5/+1
We would sometimes, rarely, have a crash that looked like this: File "..refcountstore.py", line 76, in get_refcount return self.refcounts[node_id] KeyError: 32970 In other words, the object keeping track of reference counts for B-tree nodes would think it doesn't have the reference count for a node, when it should have it. After much debugging, by myself and Itamar Turner-Trauring, and greatly helped by a repeatable test case provided by Rob Kendrick, this was tracked to an optimisation in the set_refcount method, which would remove (to save memory) the refcount for a node (remove the entry for a node's id in the refcount dict), when the refcount was set to zero. Unfortunately this conflicted with an assumption in get_refcount that a refcount for a node that was in the dirty set was actually present in the refcount dict. The bug fix is easy: don't remove the node from the refcount dict, and eat the (very minor) memory consumption hit, in the name of correctness.
2013-09-06Improve refcount-speed to not fail if it runs very fastLars Wirzenius1-2/+12
Patch from Lars Kruse
2013-09-06Update NEWS about fsck fixLars Wirzenius1-0/+5
2013-09-06Fsck fixes from Antoine BrennerLars Wirzenius3-27/+80
2013-09-06Break long linesLars Wirzenius2-5/+12
2013-09-06fsck fixes from Antoine BrennerLars Wirzenius3-27/+73
2013-08-13Add missing credit to NEWSLars Wirzenius1-1/+2
2013-08-08Prepare release version 1.20130808larch-1.20130808Lars Wirzenius3-2/+8
2013-08-08Remove trailing spacesLars Wirzenius1-2/+2
2013-08-03Fix partly-committed journal handling in read-only mode.Lars Wirzenius2-17/+36
2013-08-03Update NEWS about bug fixLars Wirzenius1-0/+8
2013-08-03Bugfix: Use uncomitted journal when read-onlyLars Wirzenius1-17/+28
What used to happen: * Instance 1 would crash in the middle of committing a journal. * Instance 2 would open the B-tree in read-only mode, and not read files from the journal. It would then crash, because the partly modified B-tree made no sense. What happens now: * When a B-tree is opened in read-only mode, and the journal is partly comitted, the journal is checked in preference for files in the B-tree proper. No confusion anymore.
2013-05-19Increase refcount-speed iterations by 10xLars Wirzenius1-1/+1
CI just failed because of zero division, due to the test going too fast.
2013-03-16Prepare release version 1.20130316larch-1.201303161.20130316Lars Wirzenius3-2/+8
2013-02-25Run speed test scriptsLars Wirzenius1-1/+5
This is not to do actual benchmarking, only to make sure the scripts stay working.
2013-02-25Fix idspeed-test to use larch, not obnamlibLars Wirzenius1-2/+2
2013-02-24Improve error messages for missing nodesLars Wirzenius3-5/+8
2013-01-20Fix speed-testLars Wirzenius9-24/+43
2013-01-16Repair non-working example.py and speed-testAntoine Brenner8-21/+26
The introduction of the allow_writes parameter in larch/forest.py:open_forest() broke example.py and speed-test. Just adding the parameter to the open_forest calls was not enough to fix the issue. This patch fixes the issue by adding the allow_writes parameter where it is needed beyond the open_forest calls. Most notably, this patch changes the __init__ signature of the abstract base class larch.NodeStore from __init__(self, node_size, codec) to __init__(self, allow_writes, node_size, codec) This mimicks the current signatures of NodeStoreDisk and NodeStoreMemory, which include the use of allow_writes as first parameter, and which seem required to actually create a forest anyway since forest.py creates node_store instances with allow_writes as first parameter in open_forest
2013-01-16Fix allow_writeBrinx5-13/+14
2013-01-05Show node ids in error messages in hexLars Wirzenius2-6/+8
This makes it easier to find them on disk, since the filenames are already in hex.
2013-01-04(minor) report node numbers in hex format in order to match with filenamesDamien Couroussé1-3/+3
2012-12-19Fix missing B-tree nodes in fsckLars Wirzenius2-12/+58
2012-12-19Update NEWSLars Wirzenius1-0/+6
2012-12-19Fix missing node problems by removing them from B-treesLars Wirzenius1-7/+26
2012-12-19Refactor logic for checking index nodesLars Wirzenius1-12/+32
This is a preliminary step for dealing with missing children. We're going to need to do a get_node for the children, but we want to avoid doing that many times per node, so this change makes it so this will be easier to do.
2012-12-19Add missing empty lineLars Wirzenius1-0/+1
2012-12-16Prepare release version 1.20121216larch-1.20121216Lars Wirzenius3-2/+8
2012-12-03Improve fsck and related bug fixesLars Wirzenius4-142/+58
2012-12-03Optionally add original exception to NodeMissingLars Wirzenius2-5/+10
2012-12-02Log the exception that gets replaced by NodeMissingLars Wirzenius1-0/+2
2012-12-02Fix an other instance of OSError mis-creationLars Wirzenius1-1/+1
2012-12-02Fix how OSError is createdLars Wirzenius1-2/+2
2012-11-25Set refcount correctlyLars Wirzenius1-1/+2
2012-11-24Fix refcount errorsLars Wirzenius1-0/+16