Skip to content

kvserver: sep-raft-log: introduce struct for optional two engines #93243

@tbg

Description

@tbg

In a separate raft log setup, we have two engines across which a Replica's data is partitioned. We should leverage the type system to make sure these two engines can't accidentally be swapped, and introduce a struct that holds them which can serve as the main entry point for documentation of invariants and concepts. Straw man:

// Big comment here
type Storage {
  LogEngine LogEngine // if nil, not separate raft log
  StateEngine StateEngine
}

// Accessors/helpers to make it easier to support both configurations.

Epic: CRDB-220

Jira issue: CRDB-22236

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions