The commits in this PR work towards creating a general-purpose reader for our replicator log.
Although OLogReader already existed, it exposed implementation details such as the control entries in the log, as well as the type of log entry itself (i.e. OLogEntry). This genericizes OLogReader, and it introduces a new simplified kind of "entry" for the replicator client to use -- ReplicatorEntry. ReplicatorEntry only knows about sequence number and data -- nothing else such as "terms" or "quorums". The commits in this PR then implement decoding the log into instances of ReplicatorEntry.
The motivation is to support an interface abstract enough that if our replicator implementation is used for some arbitrary non-C5DB use, such as replicating HBase WALs, the user will not be tied to implementation details.
The commits in this PR work towards creating a general-purpose reader for our replicator log.
Although OLogReader already existed, it exposed implementation details such as the control entries in the log, as well as the type of log entry itself (i.e. OLogEntry). This genericizes OLogReader, and it introduces a new simplified kind of "entry" for the replicator client to use -- ReplicatorEntry. ReplicatorEntry only knows about sequence number and data -- nothing else such as "terms" or "quorums". The commits in this PR then implement decoding the log into instances of ReplicatorEntry.
The motivation is to support an interface abstract enough that if our replicator implementation is used for some arbitrary non-C5DB use, such as replicating HBase WALs, the user will not be tied to implementation details.