Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
111544: streamingccl: clarify that license is needed on both clusters r=adityamaru a=stevendanna

At least one user was confused by this. Perhaps this small update will make it more clear.

Fixes cockroachdb#111525

Release note: None

111569: configprofiles: avoid slices stomping each other r=stevendanna a=knz

Epic: CRDB-26691

This patch ensures that each config profile has its distinct task
slice.

(I'm somewhat surprised this fix only affects the test outputs. I have
tried manually to set up a cluster with either profile and the
settings were right. I think it will only trigger with any subsequent
reuse of the slice.)

Release note: None

Co-authored-by: Steven Danna <[email protected]>
Co-authored-by: Raphael 'kena' Poss <[email protected]>
  • Loading branch information
3 people committed Oct 2, 2023
3 parents b8c015c + 1e7d9ea + 3b8d1ad commit d51a306
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/ccl/streamingccl/streamingest/stream_ingest_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func newStreamIngestManagerWithPrivilegesCheck(
execCfg.Settings, execCfg.NodeInfo.LogicalClusterID(), "REPLICATION")
if enterpriseCheckErr != nil {
return nil, pgerror.Wrap(enterpriseCheckErr,
pgcode.InsufficientPrivilege, "replication requires enterprise license")
pgcode.InsufficientPrivilege, "physical replication requires an enterprise license on the secondary (and primary) cluster")
}

isAdmin, err := evalCtx.SessionAccessor.HasAdminRole(ctx)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ccl/streamingccl/streamproducer/replication_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func newReplicationStreamManagerWithPrivilegesCheck(
execCfg.Settings, execCfg.NodeInfo.LogicalClusterID(), "REPLICATION")
if enterpriseCheckErr != nil {
return nil, pgerror.Wrap(enterpriseCheckErr,
pgcode.InsufficientPrivilege, "replication requires enterprise license")
pgcode.InsufficientPrivilege, "physical replication requires an enterprise license on the primary (and secondary) cluster")
}

return &replicationStreamManagerImpl{evalCtx: evalCtx, txn: txn}, nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/configprofiles/profiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ var virtClusterInitTasks = []autoconfigpb.Task{
},
),
// Finally.
makeTask("use the application virtual cluster template by default in CREATE VIRTUAL CLSUTER",
makeTask("use the application virtual cluster template by default in CREATE VIRTUAL CLUSTER",
/* nonTxnSQL */ []string{
"SET CLUSTER SETTING sql.create_virtual_cluster.default_template = 'template'",
},
Expand Down Expand Up @@ -141,7 +141,7 @@ var virtClusterWithAppServiceInitTasks = append(
)

func enableReplication(baseTasks []autoconfigpb.Task) []autoconfigpb.Task {
return append(baseTasks,
return append(baseTasks[:len(baseTasks):len(baseTasks)],
makeTask("enable rangefeeds and replication",
/* nonTxnSQL */ []string{
"SET CLUSTER SETTING kv.rangefeed.enabled = true",
Expand Down
4 changes: 2 additions & 2 deletions pkg/configprofiles/testdata/virtual-app-repl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ WHERE variable IN (
)
ORDER BY variable
----
cross_cluster_replication.enabled false
kv.rangefeed.enabled false
cross_cluster_replication.enabled true
kv.rangefeed.enabled true
server.controller.default_target_cluster application
spanconfig.range_coalescing.application.enabled false
spanconfig.range_coalescing.system.enabled false
Expand Down

0 comments on commit d51a306

Please sign in to comment.