Commit Graph

30 Commits

Author SHA1 Message Date
Ming-Hung Tsai
e724a72045 [btree] Implement btree::remove() 2020-06-19 18:07:55 +08:00
Ming-Hung Tsai
f803c44e93 [btree] Implement btree::destroy() to delete the entire tree
Also decrease the reference count of the mapped values.
(e.g., bitmap blocks of btree_index_store)
2020-06-19 18:07:55 +08:00
Joe Thornber
4313469475 [all] Switch from boost::shared_ptr -> std::shared_ptr.
Shared_ptr has moved into the standard library since these tools were
first written.
2020-04-30 15:02:43 +01:00
Joe Thornber
e801cc607b [block_manager] Hard code block size to 4k.
We're never going to use anything other than 4k, and by hard coding it we
avoid making block_manager a template.
2020-04-30 14:30:01 +01:00
Ming-Hung Tsai
6863db6f86 [thin] fix duplicated counting of mapped blocks in restore emitter 2016-08-10 23:40:48 +08:00
Joe Thornber
c32aaab028 [validators] Move the btree node validator into a separate file. 2015-08-11 11:58:07 +01:00
Joe Thornber
85d1701ba1 [btree_damage_visitor] Check the value_size agrees.
Patch from Ming-Hung Tsai
2015-05-26 12:06:34 +01:00
Joe Thornber
a7c96c0e1e [everything] Fix circular shared pointer references.
We had a cycle from transaction_manager <-> space_map, and also from
the ref_counters back up to the tm.

This prevented objects being destroyed when various programs exited.

From now on we'll try and only use a shared ptr if ownership is
implied.  Otherwise a reference will be used (eg, for up pointers).
2014-08-26 11:14:49 +01:00
Joe Thornber
7e870ea5a6 start removing block_manager<>::block 2014-07-25 14:46:51 +01:00
Joe Thornber
256cd16ab3 node_ref now checks the value_type sizes match, and the data fits within a single block. 2014-06-06 15:05:41 +01:00
Joe Thornber
9e0540e1b6 era_check, era_dump 2014-01-23 00:46:03 +00:00
Joe Thornber
983a5e84e6 Move endian_utils to base/ 2013-11-19 10:23:35 +00:00
Joe Thornber
500e508c6d fix up some coverity issues 2013-08-15 16:26:17 +01:00
Joe Thornber
77286e0bc7 Take out some 'typename's to support older versions of gcc (Heinz). 2013-08-15 10:35:07 +01:00
Joe Thornber
eb8d4c6f0b Get tools building with g++ 4.8.1 2013-06-25 13:48:02 +01:00
Joe Thornber
83a09e1a2a [btree] use a block_ref_counter for internal nodes 2013-06-20 14:29:48 +01:00
Joe Thornber
c8a5d0753d [btree] factor out inc_children 2013-06-20 12:17:16 +01:00
Joe Thornber
a2e51062e3 [btree] call inc_children when shadowning a btree node. 2013-06-19 17:20:12 +01:00
Joe Thornber
6706493304 Remove some global 'using namespace's 2013-05-28 13:48:10 +01:00
Joe Thornber
b98dac8978 [btree] introduce a btree_path typedef 2013-05-17 10:58:34 +01:00
Joe Thornber
b0d1fa0851 Sanitise btree_detail::node_location 2013-05-15 13:37:30 +01:00
Joe Thornber
44d0b1903f [btree] allow visitors to trap node access failures such as checksum error. 2013-05-07 15:22:13 +01:00
Joe Thornber
a828cde96d [btree] visitor now passed as a reference rather than shared_ptr 2013-05-02 12:31:33 +01:00
Joe Thornber
5d0b23beea Some btree visitor tidying.
Introduce node_location to replace the long list of parameters.  Also
add a depth field to keep track of the depth from root.
2013-05-01 16:16:23 +01:00
Joe Thornber
5367631c8c [various data structures] Reuse validators rather than always creating a new one. 2013-04-26 14:15:20 +01:00
Joe Thornber
f9bf18adf6 Move array_t to gmock 2013-03-22 13:42:20 +00:00
Joe Thornber
11a41c4cf4 Pull ref_counter out of btree.h 2013-03-13 12:58:05 +00:00
Joe Thornber
7d18b08b91 rename NoOpRefCounter -> no_op_ref_counter 2013-02-01 14:49:26 +00:00
Joe Thornber
4eadd9438e add fixme 2013-02-01 12:01:23 +00:00
Joe Thornber
aacca8d963 Introduce persistent-data/data-structures/ 2013-01-11 19:26:51 +00:00