vinyl: dump primary index after secondary
If a space has more than one index, appending a statement to it requires reading the primary index to get the old tuple and delete it from secondary indexes. This means that on local recovery from WAL, the primary index must not be ahead of secondary indexes of the same space, i.e. it must be dumped last. To assure that, do the following: - Make the dump heap prioritize indexes with greater iid if they are equally old. - Temporarily remove the primary index from the scheduler while a secondary index is being dumped. Since every complete dump is consistent in vinyl, removal of a primary index from the dump heap won't make the scheduler pick an already dumped secondary index again, resulting in a live lock. It also guarantees that while a primary index is exempted from the scheduler, it can't "run ahead" of dumped secondary indexes, because only statements that had been inserted by the start of the dump will be dumped, no matter what. Closes #2410
Loading
Please register or sign in to comment