These are chat archives for atomix/atomix

15th
Jul 2016
Tom
@taobaorun
Jul 15 2016 06:31
hi,there is no global index in raft .why to design the global index in copycat ? thanks
Jordan Halterman
@kuujo
Jul 15 2016 06:38
Because Copycat implements a form of incremental log compaction that’s not typically implemented in most Raft implementations. The concept of an index is not antithetical to anything Raft does. It’s just not necessitated by the typical Raft implementation which uses snapshotting for log compaction. But incremental compaction does necessitate the use of an index to remove interleaved entries from the log. This is suggested in section 5.3.1 of the Raft dissertation. In Copycat, the index is used primarily after a segment has been compacted. Once a segment has been compacted, entries in the log may be missing, and the index is used to account for those. The index still isn’t strictly necessary. Everything Copycat does to reset indexes and resolve conflicts could still be done by scans.
The form of incremental compaction described in the dissertation does necessitate indexing since it rewrites entries in the log out of order, but Copycat preserves order so indexes aren’t necessarily needed, they’re just used for efficiency.
Tom
@taobaorun
Jul 15 2016 06:45
@kuujo thxs