Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvstorage: add package #93901

Merged
merged 1 commit into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
/pkg/kv/kvserver/kvadmission/ @cockroachdb/kv-prs
/pkg/kv/kvserver/kvserverbase/ @cockroachdb/kv-prs
/pkg/kv/kvserver/kvserverpb/ @cockroachdb/kv-prs
/pkg/kv/kvserver/kvstorage/ @cockroachdb/repl-prs
/pkg/kv/kvserver/liveness/ @cockroachdb/kv-prs
/pkg/kv/kvserver/logstore/ @cockroachdb/repl-prs
/pkg/kv/kvserver/loqrecovery/ @cockroachdb/repl-prs
Expand Down
2 changes: 2 additions & 0 deletions pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,7 @@ GO_TARGETS = [
"//pkg/kv/kvserver/kvadmission:kvadmission",
"//pkg/kv/kvserver/kvserverbase:kvserverbase",
"//pkg/kv/kvserver/kvserverpb:kvserverpb",
"//pkg/kv/kvserver/kvstorage:kvstorage",
"//pkg/kv/kvserver/liveness/livenesspb:livenesspb",
"//pkg/kv/kvserver/liveness:liveness",
"//pkg/kv/kvserver/liveness:liveness_test",
Expand Down Expand Up @@ -2529,6 +2530,7 @@ GET_X_DATA_TARGETS = [
"//pkg/kv/kvserver/kvadmission:get_x_data",
"//pkg/kv/kvserver/kvserverbase:get_x_data",
"//pkg/kv/kvserver/kvserverpb:get_x_data",
"//pkg/kv/kvserver/kvstorage:get_x_data",
"//pkg/kv/kvserver/liveness:get_x_data",
"//pkg/kv/kvserver/liveness/livenesspb:get_x_data",
"//pkg/kv/kvserver/logstore:get_x_data",
Expand Down
11 changes: 11 additions & 0 deletions pkg/kv/kvserver/kvstorage/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
load("//build/bazelutil/unused_checker:unused.bzl", "get_x_data")
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "kvstorage",
srcs = ["doc.go"],
importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvstorage",
visibility = ["//visibility:public"],
)

get_x_data(name = "get_x_data")
22 changes: 22 additions & 0 deletions pkg/kv/kvserver/kvstorage/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2022 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

// Package kvstorage houses the logic that manages the on-disk state for the
// Replicas housed on a Store. Replicas store data in two storage.Engine
// instances, which are optionally (and at the time of writing, always)
// identical. One Engine, the "log storage", stores Raft-related state (such as
// the raft log), while the other engine stores the replicated keyspace.
//
// The ability to separate log and state machine opens up performance
// improvements, but results in a more complex lifecycle where operations that
// need to update both the state machine and the raft state require more complex
// recovery in the event of an ill-timed crash. Encapsulating and testing this
// logic is the raison d'être for this package.
package kvstorage