4 ms·
How do you recover from a compaction thread that hung or silently died? You could end up w/ quite a buffer to append in one go. edit: very nice project, btw. I
by pradocchia 17y ago
How do you recover from a compaction thread that hung or silently died? You could end up w/ quite a buffer to append in one go.
edit: very nice project, btw. I always fancied writing a db in lisp.
- mmcgrana 17y agoRight, there are actually two potential problems here: 1) the initial compaction takes a long time and there are a correspondingly large amount of buffered writes to append and 2) the compaction never finishes, either because compaction hung or died - and then we are adding to the buffer indefinitely. I don't think that 1) will be that much of a problem: the amount of writes that the db can process in the time it takes to do a compaction of even a large db should be small compared to the rate at which they can be appended to the compacted file. 2) is more problematic; I'll need to add a timeout-like guard to prevent a runaway write buffer.