Skip to content

Commit

Permalink
server: remove DeprecateBaseEncryptionRegistry
Browse files Browse the repository at this point in the history
Remove the migration server DeprecateBaseEncryptionRegistry RPC. It was
used for the migration of the encryption-at-rest registry format in
21.2 and is no longer relevant.

Missed this in cockroachdb#74314.

Release note: None
  • Loading branch information
jbowens authored and RajivTS committed Mar 6, 2022
1 parent 92513cf commit f2b61b7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
31 changes: 0 additions & 31 deletions pkg/server/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,37 +210,6 @@ func (m *migrationServer) PurgeOutdatedReplicas(
return resp, nil
}

// TODO(ayang): remove this RPC and associated request/response in 22.1
func (m *migrationServer) DeprecateBaseEncryptionRegistry(
ctx context.Context, req *serverpb.DeprecateBaseEncryptionRegistryRequest,
) (*serverpb.DeprecateBaseEncryptionRegistryResponse, error) {
const opName = "deprecate-base-encryption-registry"
ctx, span := m.server.AnnotateCtxWithSpan(ctx, opName)
defer span.Finish()
ctx = logtags.AddTag(ctx, opName, nil)

if err := m.server.stopper.RunTaskWithErr(ctx, opName, func(
ctx context.Context,
) error {
// Same as in SyncAllEngines, because stores can be added asynchronously, we
// need to ensure that the bootstrap process has happened.
m.server.node.waitForAdditionalStoreInit()

for _, eng := range m.server.engines {
if err := eng.SetMinVersion(*req.Version); err != nil {
return err
}
}

return nil
}); err != nil {
return nil, err
}

resp := &serverpb.DeprecateBaseEncryptionRegistryResponse{}
return resp, nil
}

// WaitForSpanConfigSubscription implements the MigrationServer interface.
func (m *migrationServer) WaitForSpanConfigSubscription(
ctx context.Context, _ *serverpb.WaitForSpanConfigSubscriptionRequest,
Expand Down
14 changes: 0 additions & 14 deletions pkg/server/serverpb/migration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ message SyncAllEnginesRequest{}
// SyncAllEnginesResponse is the response to a SyncAllEnginesRequest.
message SyncAllEnginesResponse{}

// DeprecateBaseEncryptionRegistryRequest is used to instruct the target node
// to stop using the Base version monolithic encryption-at-rest registry.
message DeprecateBaseEncryptionRegistryRequest {
roachpb.Version version = 1;
}

// DeprecateBaseEncryptionRegistryResponse is the response to a
// DeprecateBaseEncryptionRegistryRequest.
message DeprecateBaseEncryptionRegistryResponse{}

// WaitForSpanConfigSubscriptionRequest waits until the target node is wholly
// subscribed to the global span configurations state.
message WaitForSpanConfigSubscriptionRequest{}
Expand Down Expand Up @@ -95,10 +85,6 @@ service Migration {
// replicas with a version less than the one provided.
rpc PurgeOutdatedReplicas (PurgeOutdatedReplicasRequest) returns (PurgeOutdatedReplicasResponse) { }

// DeprecateBaseRegistry is used to instruct the target node to stop
// using the Base version monolithic encryption-at-rest registry.
rpc DeprecateBaseEncryptionRegistry (DeprecateBaseEncryptionRegistryRequest) returns (DeprecateBaseEncryptionRegistryResponse) { }

// WaitForSpanConfigSubscription waits until the target node is wholly
// subscribed to the global span configurations state.
rpc WaitForSpanConfigSubscription (WaitForSpanConfigSubscriptionRequest) returns (WaitForSpanConfigSubscriptionResponse) { }
Expand Down

0 comments on commit f2b61b7

Please sign in to comment.