Commit Graph

23 Commits

Author SHA1 Message Date
mpilman 79637f07ac Fixed several minor code issues
These will become a problem as soon as we
switch to C++17
2019-01-24 14:43:12 -08:00
Robert Escriva 268093a96d Adjust all includes to be relative to the root.
Remove the use of relative paths.  A header at foo/bar.h could be included by
files under foo/ with "bar.h", but would be included everywhere else as
"foo/bar.h".  Adjust so that every include references such a header with the
latter form.

Signed-off-by: Robert Escriva <rescriva@dropbox.com>
2018-10-19 17:35:33 +00:00
Evan Tschannen 8dd900a337 fixed the windows build 2018-10-18 20:26:45 -07:00
Stephen Atherton 3b641643cb Fixed line endings. 2018-10-18 19:46:58 -07:00
Stephen Atherton 5c3a93e41f Bug fixes involving PrefixTree length encodings and page size limits, correctness test improvements such as better key size selection and random key reuse, reduced memory footprint of control set. 2018-09-27 16:07:29 -07:00
Stephen Atherton d7d2b58fef Increased several testing parameters which exposed new bugs. Bug fix, PrefixTree's current format does not support trees larger than 64k. Cleaned up some debug output. 2018-09-24 02:42:23 -07:00
Stephen Atherton 4df093f1ea Implemented large key support by adding a superpage concept which is (currently) a BTree-level construct that treats multiple pages from the pager as a single contiguous page, splitting it up on write and reconstituting it on read. Refactored how pages are written along the way. The superpage construct will later be replaced by variable sized page support in IPager. 2018-09-19 00:32:39 -07:00
Stephen Atherton 383cac4991 This checkin is an attempt to support long keys by placing oversize key suffixes (as much as will fit) into a page and forcing the prefix bytes that do not fit to be part of the parent's page boundary leading to this page. This strategy is being abandoned but there are some valuable refactorings and debugging enhancements that are still in the right direction so they are being committed. 2018-08-28 13:46:14 -07:00
Stephen Atherton ec1dfe8ae1 Some code cleanup / renaming of things for clarity. Improved StringRef hex string output to omit a middle segment when there is an exceeded length limit. 2018-08-16 16:22:10 -07:00
Stephen Atherton 2e651f02d3 Crash fixes related to initialization and memory ownership in cursor classes. 2018-07-25 02:29:17 -07:00
Stephen Atherton 9d391498e8 Refactored how key/value memory is held in PrefixTree and VersionedBtree, eliminated many unnecessarily copies of large strings. PrefixTree tests pass but btree is still broken, just committing this because it's a large change set. 2018-07-23 03:09:13 -07:00
Stephen Atherton 7397ea4a79 Bug fixes. Memory corruption was happening due to memory ownership problems with using PrefixTree cursors. Now that internal page boundaries are truncated to the minimal necessary length they can be incomplete tuples of (key, version, offset) which was not being handled correctly (causing incorrect mutation buffer to page mappings during commit) for some partial tuple values. Tuple was modified to allow optional safe decoding of partial integer values and to assert if partial integer values are found but not allowed. Lots of debug output changes. 2018-07-18 03:19:35 -07:00
Stephen Atherton 540d88e85f Minimal page boundary keys are now being used, though there are still bugs. Many debug output changes. Bug fix regarding common prefix length calculation which was reducing compression and causing incorrect boundary keys. 2018-07-17 00:41:42 -07:00
Stephen Atherton bbf5ece5af Btree pages can now borrow prefix bytes from their upper bound key (the next key after their lower bound key in their parent page) as well as their lower bound key. 2018-07-14 13:37:52 -07:00
Stephen Atherton 09e68a4335 Lots of bug fixes around page reads and concurrency. 2018-07-03 15:39:32 -07:00
Stephen Atherton e4f347d3fd Bug fix: PrefixTree::PathEntry was not safely copyable or swappable which caused a subtle bug at the higher level causing a Cursor state to appear valid but not make sense. More debug output improvements. 2018-06-17 06:48:41 -07:00
Stephen Atherton ee17854713 Bug fixes in internal page boundaries and prefix tree overhead calculations. Improved performance test output and increased amount of work it can do. Removed temporary restrictions on correctness test parameter ranges. 2018-06-14 17:52:25 -07:00
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 06100e73ad Rewrote PrefixTree cursor to be bi-directional. 2018-05-10 13:33:13 -07:00
Stephen Atherton 72754cd74e Added benchmark/test exploring different write patterns and how they might perform using a page delta based mutation buffer. Added more efficient cursor and PrefixTree::Node access methods for decoding specific members on demand. 2018-05-07 17:44:28 -07:00
Stephen Atherton ee35a85902 Initial version of PrefixTree for use as Redwood's page format. Added Dave Scherer's CompactMap prototype and added PrefixTree testing to it along side CompactMap tests. 2018-05-01 18:33:14 -07:00