Skip to content

Commit

Permalink
upgrade: Added sessionData to TenantDeps to be used later
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiang-Gu committed Aug 26, 2022
1 parent 831bfe7 commit f1f0697
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/upgrade/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ go_library(
"//pkg/sql/catalog/descs",
"//pkg/sql/catalog/lease",
"//pkg/sql/catalog/resolver",
"//pkg/sql/sessiondata",
"//pkg/sql/sqlutil",
"//pkg/util/log",
"//pkg/util/stop",
2 changes: 2 additions & 0 deletions pkg/upgrade/tenant_upgrade.go
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/catalog/descs"
"github.com/cockroachdb/cockroach/pkg/sql/catalog/lease"
"github.com/cockroachdb/cockroach/pkg/sql/catalog/resolver"
"github.com/cockroachdb/cockroach/pkg/sql/sessiondata"
"github.com/cockroachdb/cockroach/pkg/sql/sqlutil"
"github.com/cockroachdb/logtags"
)
@@ -38,6 +39,7 @@ type TenantDeps struct {
LeaseManager *lease.Manager
JobRegistry *jobs.Registry
InternalExecutor sqlutil.InternalExecutor
SessionData *sessiondata.SessionData

SpanConfig struct { // deps for span config upgrades; can be removed accordingly
spanconfig.KVAccessor
1 change: 1 addition & 0 deletions pkg/upgrade/upgradejob/upgrade_job.go
Original file line number Diff line number Diff line change
@@ -97,6 +97,7 @@ func (r resumer) Resume(ctx context.Context, execCtxI interface{}) error {
InternalExecutor: execCtx.ExecCfg().InternalExecutor,
JobRegistry: execCtx.ExecCfg().JobRegistry,
TestingKnobs: execCtx.ExecCfg().UpgradeTestingKnobs,
SessionData: execCtx.SessionData(),
}
tenantDeps.SpanConfig.KVAccessor = execCtx.ExecCfg().SpanConfigKVAccessor
tenantDeps.SpanConfig.Splitter = execCtx.ExecCfg().SpanConfigSplitter

0 comments on commit f1f0697

Please sign in to comment.