Skip to content

Commit

Permalink
release-23.2: cherry-pick cockroachdb/raft/pull/3
Browse files Browse the repository at this point in the history
Config changes in this raft implementation require a safety constraint:
the leader must not append a config change if it hasn't applied all
config changes in its log.

The DisableConfChangeValidation flag disables this check under the
assumption that the state machine layer provides the equivalent
guarantee. However, it is hard to argue that this is true in split
leaseholder/leader scenarios.

This commit re-enables this check, to bring the safety back. The other
two state-machine-level checks concerned with entering and leaving joint
configs can still be disabled.

Epic: none
Release note: none
  • Loading branch information
pav-kv committed Jun 18, 2024
1 parent 4cfbd20 commit bc95ce3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10631,10 +10631,10 @@ def go_deps():
],
build_file_proto_mode = "default",
importpath = "go.etcd.io/raft/v3",
sha256 = "29838287d3972bf493d4c4790105558d21af63ce0cec627b085b878fe9a17943",
strip_prefix = "github.com/cockroachdb/raft/[email protected]20230717153924-72a6e6c9f3ee",
sha256 = "ce7085b92c505bec2c778fcac5d186a3156b1f0e6483316b53713f0f329f82d4",
strip_prefix = "github.com/cockroachdb/raft/[email protected]20240612143628-49a8a628fa47",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/raft/v3/com_github_cockroachdb_raft_v3-v3.0.0-20230717153924-72a6e6c9f3ee.zip",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/raft/v3/com_github_cockroachdb_raft_v3-v3.0.0-20240612143628-49a8a628fa47.zip",
],
)
go_repository(
Expand Down
2 changes: 1 addition & 1 deletion build/bazelutil/distdir_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ DISTDIR_FILES = {
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20230118201751-21c54148d20b.zip": "ca7776f47e5fecb4c495490a679036bfc29d95bd7625290cfdb9abb0baf97476",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v1.1.1-0.20240611180105-26e702194e71.zip": "57abd21d5f7e332583d39d8a9ce3b6926a4386406c768ea60758fb9c6eac7e72",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/raft/v3/com_github_cockroachdb_raft_v3-v3.0.0-20230717153924-72a6e6c9f3ee.zip": "29838287d3972bf493d4c4790105558d21af63ce0cec627b085b878fe9a17943",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/raft/v3/com_github_cockroachdb_raft_v3-v3.0.0-20240612143628-49a8a628fa47.zip": "ce7085b92c505bec2c778fcac5d186a3156b1f0e6483316b53713f0f329f82d4",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.5.zip": "11b30528eb0dafc8bc1a5ba39d81277c257cbe6946a7564402f588357c164560",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/stress/com_github_cockroachdb_stress-v0.0.0-20220803192808-1806698b1b7b.zip": "3fda531795c600daf25532a4f98be2a1335cd1e5e182c72789bca79f5f69fcc1",
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ require (
github.com/xdg-go/scram v1.1.2
github.com/xdg-go/stringprep v1.0.4
github.com/zabawaba99/go-gitignore v0.0.0-20200117185801-39e6bddfb292
go.etcd.io/raft/v3 v3.0.0-20230717153924-72a6e6c9f3ee
go.etcd.io/raft/v3 v3.0.0-20240612143628-49a8a628fa47
go.opentelemetry.io/otel v1.3.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0
go.opentelemetry.io/otel/exporters/zipkin v1.0.0-RC3
Expand Down Expand Up @@ -443,4 +443,4 @@ replace golang.org/x/time => github.com/cockroachdb/x-time v0.3.1-0.202305251236
replace google.golang.org/protobuf => google.golang.org/protobuf v1.29.1

// Take etcd-io/raft from the branch corresponding to release-23.2 in our fork.
replace go.etcd.io/raft/v3 => github.com/cockroachdb/raft/v3 v3.0.0-20230717153924-72a6e6c9f3ee
replace go.etcd.io/raft/v3 => github.com/cockroachdb/raft/v3 v3.0.0-20240612143628-49a8a628fa47
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZe
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs=
github.com/cockroachdb/pebble v1.1.1-0.20240611180105-26e702194e71 h1:CESuRSXknEtTgOaLGTKCc5gaJzBMUCBcekJRYTxE88Q=
github.com/cockroachdb/pebble v1.1.1-0.20240611180105-26e702194e71/go.mod h1:CnHUPUo2XSUfriPdNcyweFtE9dnZMSU8Gt10sXRGoJg=
github.com/cockroachdb/raft/v3 v3.0.0-20230717153924-72a6e6c9f3ee h1:xdEpudubtzPqZH7KPyHS7Evz3aR3R1LcXHimcF2sYGg=
github.com/cockroachdb/raft/v3 v3.0.0-20230717153924-72a6e6c9f3ee/go.mod h1:tP6U+sRzrl75ltgmFcdZg9reZVEyM3vKTxAWmwpHtB8=
github.com/cockroachdb/raft/v3 v3.0.0-20240612143628-49a8a628fa47 h1:fT0adzNbw60Pd/iMkgz+Eq5gEJTqyZ9SnNlvIYjg22A=
github.com/cockroachdb/raft/v3 v3.0.0-20240612143628-49a8a628fa47/go.mod h1:tP6U+sRzrl75ltgmFcdZg9reZVEyM3vKTxAWmwpHtB8=
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30=
github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
Expand Down

0 comments on commit bc95ce3

Please sign in to comment.