Commit graph

594 commits

Author SHA1 Message Date
martinsumner
6298886592 Empty non-persisted parts of record on save
Some of the manifest should not be preserved between restarts - so empty
these parts on save
2017-01-17 17:15:04 +00:00
martinsumner
c098eca06e Put tests back in 2017-01-17 16:55:35 +00:00
martinsumner
850a524ad3 Close Pending Deletes on shutdown
Pending deletes are not in the Manifest, and so were not being closed on
shutdown
2017-01-17 16:54:54 +00:00
martinsumner
3712c62a50 Broken WIP 2017-01-17 16:30:04 +00:00
martinsumner
7086717765 Rename to pmanifest
There may be a seperate imanifest in the future
2017-01-17 14:11:50 +00:00
martinsumner
2e734ff501 Corrected snapshot releases 2017-01-17 14:02:21 +00:00
martinsumner
c99c50ce6e Fix-up message exchange on confirm delete 2017-01-17 11:18:58 +00:00
martinsumner
14ebf94e56 Correct botched manifest entry removal 2017-01-17 10:53:13 +00:00
martinsumner
5076187545 Reduce log level of troubleshooting log 2017-01-17 10:39:31 +00:00
martinsumner
ec08d1ab97 Must remove before we insert - cannot safely if overlapping with insertions 2017-01-17 10:37:46 +00:00
martinsumner
5adfb5c5ef Extra logging for troubleshooting 2017-01-17 10:32:15 +00:00
martinsumner
59dc451e70 Address confusion over type in DeletionsList 2017-01-17 10:21:29 +00:00
martinsumner
c32fd3fb4c Change to use manifest_entry not straight PID in unit test 2017-01-17 10:14:40 +00:00
martinsumner
9832ecc369 Manifest now back to a simple list
This has refactored code with the implementation of the manifest
isolated in to a seperate module, and the pure async relationship
between penciller and their clerk.  However, the manifest is just a
simple list at each level.
2017-01-17 10:12:15 +00:00
martinsumner
72d16af2b1 Switch out implementation of manifest
This gives a new manifest implementation that is an array of lists.

Just basic unit testing of lookup insertion and removal in this module.
The API was changed subtly, and so nothing broader will work at this
stage
2017-01-16 23:27:42 +00:00
martinsumner
38c7c9be9b Attempt to fix manifets issues
ETS manifest is making eveyrthing SLOW.  Marked basement.  Perhaps fixed
some GC issues.
2017-01-15 12:41:16 +00:00
martinsumner
d16defa597 Remove non-compatible OTP16 option 2017-01-15 11:29:19 +00:00
martinsumner
e6c4c9eff8 Log deletions from mnaifest (via GC) 2017-01-15 11:04:26 +00:00
martinsumner
13c5cc8899 Add timing points
Add some timing points to manifest updates
2017-01-15 10:36:50 +00:00
martinsumner
8e92a2c563 Fix pclerk unit test 2017-01-15 01:47:23 +00:00
Martin Sumner
f868be8086 Change Penciller to Clerk handoff
correct the previous change to make sure that deletes are not confirmed
when work is outstanding, but also make sure that the clerk only ever
casts the Penciller so no deadlocks can ensue.
2017-01-15 00:52:43 +00:00
martinsumner
9577d24be0 Wait on close of penciller clerk
The clerk never calls the Penciller, so cannot deadlock.  Will wait for
a merge to be complete
2017-01-14 22:59:04 +00:00
martinsumner
0c01a90f96 Manifest SQN at startup
An L0 file outside the Manifest will be written at a Manifest SQN one
higher - so need to look at stratup for one at one higher
2017-01-14 22:31:45 +00:00
martinsumner
7b0b3e9b83 Add logging of Manifest SQN at startup 2017-01-14 22:26:26 +00:00
martinsumner
ea171cb13b Attempt to stop race - between level zero and ongoing merge 2017-01-14 22:03:57 +00:00
martinsumner
dcf3afc056 Log basement setting when creating files 2017-01-14 21:19:51 +00:00
martinsumner
8f0a096dd2 More work on timeout 2017-01-14 20:57:43 +00:00
martinsumner
86af99e511 Set timeout correctly 2017-01-14 20:19:08 +00:00
martinsumner
85c03a61f9 Log changes 2017-01-14 20:11:01 +00:00
martinsumner
13c81f0ed1 Basic working
Some basic tests working - but still outstanding issues.
2017-01-14 19:41:09 +00:00
martinsumner
76bdd83346 Manifest refactor - STILL BROKEN
Some working tests now, but sitll broken
2017-01-14 16:36:05 +00:00
martinsumner
0204a23a58 Refactor - STILL BROKEN
Will at least compile, but in need of a massive eunit rewrite and
associated debug to get back to a potentially verifiable state again
2017-01-13 18:23:57 +00:00
martinsumner
08641e05cf Manifest changes - BROKEN
Going to abandond this branch for now.  The change is beoming
excessively time consuming, and it is not clear that a smaller change
might not achieve more of the objectives.

All this is broken - but perhaps could get picke dup another day.
2017-01-12 13:48:43 +00:00
martinsumner
439ddfa4eb Add support for initiate
The penciller requires a starting manifest SQN as well as a list of
filenames to open on startup.  It is assumed that the penciller will
keep the mappings between fileames and PIDs outside of the manifest.
2017-01-09 15:19:11 +00:00
martinsumner
ed27a53452 New manifest code
The manifest had previously been a list for eveyr leevl of the manifest,
and keys were found by folding over the list.  By Level 4 the list will
be 4096 items long, and so the fold would be expensive, and would be
required many times.

To make this less expensive an ETS table is to use.  However, the ETS
table needs to be shared between snapshots and so in order to use the
ETS the entries to the table need to support multi-versioning - whereby
each clone can see a version of the table at the Manifest SQN the clone
is supporting.
2017-01-09 14:52:26 +00:00
martinsumner
b2bb4ce73e Merge pull request #15 from martinsumner/mas-altmem
Mas altmem
2017-01-06 10:30:03 +00:00
martinsumner
83be8041f0 Update comments to reflect changes 2017-01-06 10:09:15 +00:00
martinsumner
24ec918eb1 Handle no-lookup hash in retain strategy 2017-01-05 22:42:59 +00:00
martinsumner
a617f8fb66 Fix snapshot_store - add index to clone
Clone was not getting the updated index
2017-01-05 22:17:30 +00:00
martinsumner
5a88565c08 Switch to binary index in pmem
Remove the ets index in pmem and use a binary index instead.  This may
be slower, but avoids the bulk upload to ets, and means that matches
know of position (so only skiplists with a match need be tried).

Also stops the discrepancy between snapshots and non-snapshots - as
previously the snapshots were always slowed by not having access to the
ETS table.
2017-01-05 21:58:33 +00:00
martinsumner
1d3fb18df7 Resolve snapshotting issue
Need to make sure the extract from ets happens at the point the snapshot
is taken.
2017-01-05 18:43:55 +00:00
martinsumner
2c828b8eca Fix snapshot issue 2017-01-05 17:55:27 +00:00
martinsumner
e6270d288f Half-way to ets for Bookie mem
A half-way implementation with use of ETS as the bookie's memory
2017-01-05 17:00:12 +00:00
martinsumner
bbdb35ae03 Add ordered_set conversion
Can we go from an ets table to a skiplist
2017-01-05 14:09:39 +00:00
martinsumner
34a25bdb88 Improve from_list in skiplist
form_list had taken a suprrising amount of time - so improved the
efficiency of this
2017-01-05 13:57:38 +00:00
martinsumner
c43014a0ee Merge pull request #14 from martinsumner/mas-altsst
Mas altsst
2017-01-04 23:30:42 +00:00
martinsumner
2f8ff640a9 Test coverage
Add some furthe runit tests to improve test coverage
2017-01-04 21:36:59 +00:00
martinsumner
6e8f8a9c86 Strip out extra stuff from skiplist 2017-01-04 17:19:27 +00:00
martinsumner
f1d26e279c Merge branch 'mas-altsst' of https://github.com/martinsumner/eleveleddb into mas-altsst 2017-01-04 14:26:19 +00:00
martinsumner
7d95fa6bbc Switch summary index
Simplify the summayr index implementation
2017-01-04 14:26:11 +00:00