Commit Graph

392 Commits

Author SHA1 Message Date
Stephen Atherton 77df55d9e1 Bug fixes in page building causing memory corruption, improved debugging output, added memory initialization to new pages when valgrind is enabled to avoid unconcerning errors. 2018-06-14 04:15:14 -07:00
Stephen Atherton d291cc9ec3 Bug fixes in cursor logic related to database and page ends. Rewrote cursor related toString() methods and debug output to make debugging easier. 2018-06-12 01:43:19 -07:00
Stephen Atherton 69b713918b VersionedBTree now uses PrefixTree based pages (with bugs). This required significant changes to both classes because the interface and semantics for building, seeking in, and iterating through pages is very different from the previous trivial approach which was based on serialized vectors. PrefixTree node format rewritten to support optional values without increasing overhead for common node scenarios. PrefixTree::Cursor rewritten to reuse path prefix memory instead of allocating new memory on each movement which is then 'leaked' until destruction. PrefixTree::Cursor movement modified to work better with VersionedBTree::InternalCursor, which was also heavily modified. Added knobs related to key arrangement in PrefixTree nodes. Added StringRef::toHexString() as an alternative to printable() to make reading raw PrefixTree data easier. PrefixTree performance is temporarily worse with this update and VersionedBtree fails its unit test. 2018-06-08 03:32:34 -07:00
Stephen Atherton 4a58ed3b11 Debug output improvements, removed unused function. 2017-10-09 13:31:54 -07:00
Stephen Atherton b15d29dd6b VersionedBTrees now have names for logging purposes (trees do not deal with files directly but rather just an IPager). Bug fix in pager vacuumer which was not updating checksums. KeyValueStoreRedwood now relies on VersionedBTree to handle commit ordering, as there’s no reason to do this in both classes. 2017-10-09 13:24:16 -07:00
Stephen Atherton 0635a31604 Better error and dispose/close handling, closer to correct behavior for an IKeyValueStore. 2017-10-02 03:32:22 -07:00
Stephen Atherton ed226e2e1c VersionedBtree now allows writes while a commit is in progress. Also, lots of bug fixes, like the one where writes during commits weren’t prevented but also didn’t work. 2017-09-22 17:18:28 -07:00
Stephen Atherton 248dab79b6 Created “redwood” storage engine option and many changes to support that including IKeyValueStore::init() and custom DiskQueue file extensions. 2017-09-21 23:51:55 -07:00
Stephen Atherton d880569d52 Checkpointing progress on KeyValueStoreMVBTree. All methods are implemented to a usable point, and everything compiles, but Worker does not yet try to use it. 2017-09-21 04:43:49 -07:00
Stephen Atherton e16ce63db0 Bug fix, find was being done with a key ref that wasn’t living as long as the actor. 2017-09-21 00:58:56 -07:00
Stephen Atherton eee8116fa4 Cleaned up how the root page is written and page write debug output. 2017-09-20 17:50:02 -07:00
Stephen Atherton 9b4cbe94aa Bug fix, values exactly the size of the maximum part size were still split into a part set but of size 1, which is invalid. Also some debug output changes. 2017-09-19 13:03:30 -07:00
Stephen Atherton 25f958ac3b Bug fixes. Finished backward iteration on Cursor. Correctness range verification now also reads the range in reverse and verifies the result. 2017-09-17 04:38:01 -07:00
Stephen Atherton 1aae32dc16 Some cleanup. InternalCursor does not need to be reference counted. 2017-09-16 02:09:09 -07:00
Stephen Atherton c89b45158a Removed InternalCursor::seekEqualOrGreaterThan because it isn’t needed, it’s always better to do a <= search so if the target key is found the initial cursor position will be at the last version prior to the target version. 2017-09-16 01:59:16 -07:00
Stephen Atherton cea7903b46 Bug fixes involving edges cases with find >= and range read endpoints. 2017-09-16 01:45:39 -07:00
Stephen Atherton 15622f026e Forward range reads are done. 2017-09-15 17:27:13 -07:00
Stephen Atherton 125d8168b4 Checkpointing progress on range reads (ordered iteration of user visible kv pairs via cursor). Added InternalCursor class which is used for all seeks and reads and sees the multi version, fragmented kv pairs and clears. Fixed a bug in commit which was discovered by the range read test where kv pairs (full or partial) could be missing from the tree but only for versions where they did not change. The write verification test did not find this because it only verifies exactly the changed versions of each key. The range test is not finished yet. 2017-09-15 05:19:39 -07:00
Stephen Atherton 919a3d1740 Iterating over and coalescing the “internal” records (not user visible, tuple of (key, version, valueIndex, value)) now works forward and backward, and findEqual() now works using this to read split values fully. This is also most of the work needed for range reads. 2017-09-09 01:29:25 -07:00
Stephen Atherton b5f79d27f7 Large values are now split and stored, but not yet read correctly. 2017-09-05 16:59:31 -07:00
Stephen Atherton 9745334704 Changed random parameter range so that at least two internal keys can always fit in a single page. 2017-09-01 00:17:07 -07:00
Stephen Atherton 88e48e9a3e Bug fix in detection of lack of mutations in a subtree. 2017-08-31 01:23:12 -07:00
Stephen Atherton 5049421a0e More comments, debug output improvements. 2017-08-28 17:26:53 -07:00
Stephen Atherton 14ef5bed42 Major bug fix. In certain situations, some mutations were being applied to two adjacent pages, which had a lot of crazy side effects. 2017-08-28 06:28:49 -07:00
Stephen Atherton d9136743f7 Bug fix, reformatted and cleaned up a lot of debug output. 2017-08-28 03:53:29 -07:00
Stephen Atherton 0fd57e9183 Many bug fixes. 2017-08-28 01:57:01 -07:00
Stephen Atherton 1070a5ed66 Several bug fixes. 2017-08-25 15:48:32 -07:00
Stephen Atherton 888093463b Checkpointing progress on large rewrite of how mutations are stored and applied. Not working yet. 2017-08-24 17:25:53 -07:00
Stephen Atherton 0b817f95f2 Bug fixes, but there’s still an issue with crossing page boundaries at the same key. 2017-08-22 11:30:44 -07:00
Stephen Atherton aff31b7f36 Checkpointing. Clears almost work, but two edge cases aren’t handled correctly yet involving range clears that must cross leaf page boundaries. 2017-08-21 22:29:57 -07:00
Stephen Atherton de03491475 Switched to new commit buffer type which can support more than set, but so far only set is implemented. 2017-08-04 00:01:25 -07:00
Stephen Atherton dbcd3526d7 Memory lifetime bug fix and previously missed changes for enforcing only reading committed versions. 2017-08-03 15:07:29 -07:00
Stephen Atherton 31314d06d4 Added test stats. Added enforcement of only reading committed versions, which is a currently an implementation limitation. 2017-07-25 16:10:19 -07:00
Stephen Atherton d61f74e52b Debug output changes. 2017-07-14 13:39:58 -07:00
Stephen Atherton 8b3569e27e Bug fix. 2017-07-14 11:37:08 -07:00
Stephen Atherton fc0557252b Bug fixes. Btree now uses page 0 as root and will write initial page only if necessary. Added debug printf macro. 2017-07-14 11:36:49 -07:00
Stephen Atherton d8b82ecbe4 Added use of IndirectShadowPager. Moved MemoryPager code into .cpp because of type conflicts and its implementation doesn’t need to be externally visible anyway. Added start of a performance test. Renamed tests. Correctness/set now has random reopen of disk based pager before verification. Added asserts for when keys or values that are too large to fit in a single page. 2017-07-13 22:11:48 -07:00
Stephen Atherton b56f5643d5 Bug fixes. 2017-07-13 14:51:39 -07:00
Stephen Atherton bea061fd75 Bug fix, building tree root (1 or more top levels) must happen inside commitSubtree() otherwise the root page logical ID (1) can be written out of version order. 2017-07-13 11:32:14 -07:00
Stephen Atherton c508e8bdf9 Adjacent internal btree pages can now contain the same keys at different versions. 2017-07-04 23:49:18 -07:00
Stephen Atherton 1a71df1871 Lots of bug fixes and debug output added. Unitttest for set works…pretty often. 2017-07-04 23:41:48 -07:00
Stephen Atherton b65ad3563c Merge branch 'master' into feature-redwood
# Conflicts:
#	fdbserver/fdbserver.vcxproj
#	fdbserver/fdbserver.vcxproj.filters
2017-06-09 14:56:41 -07:00