jgraettinger / samoa

scalable datastructure store
1 stars 0 forks source link

benchmark alternative for tracking dead records #1

Open jgraettinger opened 13 years ago

jgraettinger commented 13 years ago

Currently records are explicitly marked for GC when a new value is written forward in the rolling hash. This requires a disk seek during the write, to read / write the dead-bit, and potentially an extra write if the page soon gets flushed out of memory.

This can be deferred to when records fall off the end of the ring-- in this case, a record is 'dead' if another record of the same key occurs before it in the hash chain. Downside is, this requires an extra read during ring rotation to establish whether such a record exists. Removes the need for an extra write, I think.

jgraettinger commented 13 years ago

An issue: I think this breaks iteration, as it's no-longer possible to efficiently determine if a record is dead.