raftentry: Cache should hold raftlog.Entry
, not raftpb.Entry
#99778
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-kv-replication
KV Replication Team
Is your feature request related to a problem? Please describe.
a
raftpb.Entry
needs to be unmarshaled, which is expensive. It might make sense to hold the already-unmarshaledraftlog.Entry
1 instead.Describe the solution you'd like
See above.
Describe alternatives you've considered
raftlog.Entry
has a larger memory footprint, so there is a trade-off.Additional context
Our currently raft entry cache sizing seems extremely stingy2 and we should revisit it if we decide to address this issue (and even if we don't!)
Jira issue: CRDB-26072
Footnotes
https://github.com/cockroachdb/cockroach/blob/4df47f54f042355a7b2231a9efc15aa1857d81d5/pkg/kv/kvserver/raftlog/entry.go#L73-L84 ↩
https://github.com/cockroachdb/cockroach/issues/98666 ↩
The text was updated successfully, but these errors were encountered: