Skip to content

Commit

Permalink
ptverifier: delete Verifier
Browse files Browse the repository at this point in the history
Verification semantics are not supported in the new multi-tenant
protected timestamp subsystem. For details about why this is the
case please refer to the `Verification` section in the
RFC at cockroachdb#74685.

This change deletes the Verifier, and all references of it.

Informs: cockroachdb#73727

Release note: None

Release justification: low risk change to existing functionality
  • Loading branch information
adityamaru committed Mar 9, 2022
1 parent 31b2e6b commit 999af9d
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 503 deletions.
1 change: 0 additions & 1 deletion pkg/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ ALL_TESTS = [
"//pkg/kv/kvserver/protectedts/ptcache:ptcache_test",
"//pkg/kv/kvserver/protectedts/ptreconcile:ptreconcile_test",
"//pkg/kv/kvserver/protectedts/ptstorage:ptstorage_test",
"//pkg/kv/kvserver/protectedts/ptverifier:ptverifier_test",
"//pkg/kv/kvserver/protectedts:protectedts_test",
"//pkg/kv/kvserver/raftentry:raftentry_test",
"//pkg/kv/kvserver/rangefeed:rangefeed_test",
Expand Down
11 changes: 0 additions & 11 deletions pkg/kv/kvserver/protectedts/protectedts.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ var ErrExists = errors.New("protected timestamp record already exists")
type Provider interface {
Storage
Cache
Verifier
Reconciler

Start(context.Context, *stop.Stopper) error
Expand Down Expand Up @@ -134,16 +133,6 @@ type Cache interface {
Refresh(_ context.Context, asOf hlc.Timestamp) error
}

// Verifier provides a mechanism to verify that a created Record will certainly
// apply.
type Verifier interface {

// Verify returns an error if the record of the provided ID cannot be
// verified. If nil is returned then the record has been proven to apply
// until it is removed.
Verify(context.Context, uuid.UUID) error
}

// Reconciler provides a mechanism to reconcile protected timestamp records with
// external state.
type Reconciler interface {
Expand Down
1 change: 0 additions & 1 deletion pkg/kv/kvserver/protectedts/protectedts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ func TestProtectedTimestamps(t *testing.T) {
var (
_ Provider
_ Cache
_ Verifier
_ Storage
_ = EmptyCache(nil)
_ = ErrNotExists
Expand Down
1 change: 0 additions & 1 deletion pkg/kv/kvserver/protectedts/ptprovider/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ go_library(
"//pkg/kv/kvserver/protectedts/ptcache",
"//pkg/kv/kvserver/protectedts/ptreconcile",
"//pkg/kv/kvserver/protectedts/ptstorage",
"//pkg/kv/kvserver/protectedts/ptverifier",
"//pkg/settings/cluster",
"//pkg/sql/sqlutil",
"//pkg/util/metric",
Expand Down
4 changes: 0 additions & 4 deletions pkg/kv/kvserver/protectedts/ptprovider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptcache"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptreconcile"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptstorage"
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptverifier"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/sql/sqlutil"
"github.com/cockroachdb/cockroach/pkg/util/metric"
Expand All @@ -42,7 +41,6 @@ type Config struct {
// Provider is the concrete implementation of protectedts.Provider interface.
type Provider struct {
protectedts.Storage
protectedts.Verifier
protectedts.Cache
protectedts.Reconciler
metric.Struct
Expand All @@ -54,7 +52,6 @@ func New(cfg Config) (protectedts.Provider, error) {
return nil, err
}
storage := ptstorage.New(cfg.Settings, cfg.InternalExecutor, cfg.Knobs)
verifier := ptverifier.New(cfg.DB, storage)
reconciler := ptreconcile.New(cfg.Settings, cfg.DB, storage, cfg.ReconcileStatusFuncs)
cache := ptcache.New(ptcache.Config{
DB: cfg.DB,
Expand All @@ -65,7 +62,6 @@ func New(cfg Config) (protectedts.Provider, error) {
return &Provider{
Storage: storage,
Cache: cache,
Verifier: verifier,
Reconciler: reconciler,
Struct: reconciler.Metrics(),
}, nil
Expand Down
48 changes: 0 additions & 48 deletions pkg/kv/kvserver/protectedts/ptverifier/BUILD.bazel

This file was deleted.

31 changes: 0 additions & 31 deletions pkg/kv/kvserver/protectedts/ptverifier/main_test.go

This file was deleted.

147 changes: 0 additions & 147 deletions pkg/kv/kvserver/protectedts/ptverifier/verifier.go

This file was deleted.

Loading

0 comments on commit 999af9d

Please sign in to comment.