cockroachdb / cockroach

CockroachDB - the open source, cloud-native distributed SQL database.
https://www.cockroachlabs.com
Other
29.59k stars 3.71k forks source link

kvserver: sep-raft-log: type safety for log and state engine #97618

Open tbg opened 1 year ago

tbg commented 1 year ago

With the introduction of the separate raft log, we have a number of methods that operate on an engine which is assumed to always be (say) raft log. It would be nice to leverage the type system to make it clear that some methods only ever operate on one kind of engine.

Perhaps extensions of storage.Read{Writ,}er, etc, could be introduced and used in appropriate locations.

Epic: CRDB-220

Jira issue: CRDB-39892

blathers-crl[bot] commented 1 year ago

cc @cockroachdb/replication