Skip to content

Commit

Permalink
cluster: remove VersionSnapshotsWithoutLog
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
nvanbenschoten committed Jun 26, 2019
1 parent caebf7e commit 7400cc4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
12 changes: 6 additions & 6 deletions pkg/settings/cluster/cockroach_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const (
Version2_1
VersionUnreplicatedRaftTruncatedState // see versionsSingleton for details
VersionSideloadedStorageNoReplicaID // see versionsSingleton for details
VersionSnapshotsWithoutLog
Version19_1
VersionStart19_2
VersionQueryTxnTimestamp
Expand Down Expand Up @@ -447,11 +446,12 @@ var versionsSingleton = keyedVersions([]keyedVersion{
// Key: VersionPushTxnToInclusive,
// Version: roachpb.Version{Major: 2, Minor: 1, Unstable: 10},
// },
{
// VersionSnapshotsWithoutLog is https://github.com/cockroachdb/cockroach/pull/36714.
Key: VersionSnapshotsWithoutLog,
Version: roachpb.Version{Major: 2, Minor: 1, Unstable: 11},
},
// Removed.
// {
// // VersionSnapshotsWithoutLog is https://github.com/cockroachdb/cockroach/pull/36714.
// Key: VersionSnapshotsWithoutLog,
// Version: roachpb.Version{Major: 2, Minor: 1, Unstable: 11},
// },
{
// Version19_1 is CockroachDB v19.1. It's used for all v19.1.x patch releases.
Key: Version19_1,
Expand Down
15 changes: 7 additions & 8 deletions pkg/settings/cluster/versionkey_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pkg/storage/replica_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/keys"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/rpc/nodedialer"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/storage/engine"
"github.com/cockroachdb/cockroach/pkg/storage/storagebase"
"github.com/cockroachdb/cockroach/pkg/storage/storagepb"
Expand Down Expand Up @@ -1130,8 +1129,7 @@ func (r *Replica) sendSnapshot(
}

canAvoidSendingLog := !usesReplicatedTruncatedState &&
snap.State.TruncatedState.Index < snap.State.RaftAppliedIndex &&
r.store.ClusterSettings().Version.IsActive(cluster.VersionSnapshotsWithoutLog)
snap.State.TruncatedState.Index < snap.State.RaftAppliedIndex

if canAvoidSendingLog {
// If we're not using a legacy (replicated) truncated state, we avoid
Expand Down

0 comments on commit 7400cc4

Please sign in to comment.