Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changefeedccl: misc fixes for tenant compatibility #57805

Merged
merged 3 commits into from
Jan 8, 2021

Conversation

dt
Copy link
Member

@dt dt commented Dec 10, 2020

see commits -- mostly just avoiding using NodeID, plus don't read meta2 directly.

@dt dt requested review from ajwerner, a team and pbardea and removed request for a team December 10, 2020 22:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@dt dt requested review from HonoreDB and removed request for pbardea December 10, 2020 22:08
dsp := execCtx.DistSQLPlanner()
evalCtx := execCtx.ExtendedEvalContext()
planCtx := dsp.NewPlanningCtx(ctx, evalCtx, nil /* planner */, noTxn, true /* distribute */)
planCtx := dsp.NewPlanningCtx(ctx, evalCtx, nil /* planner */, noTxn, execCfg.Codec.ForSystemTenant() /* distribute */)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary, right? Eventually tenants will be distributed?

Copy link
Contributor

@ajwerner ajwerner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 4 of 4 files at r1, 2 of 2 files at r2, 1 of 1 files at r3.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dt and @HonoreDB)


pkg/ccl/changefeedccl/changefeed_dist.go, line 113 at r3 (raw file):

Previously, HonoreDB (Aaron Zinger) wrote…

This is temporary, right? Eventually tenants will be distributed?

It's not in any immediate roadmap. The KV layer is distributed but for now the SQL execution is all local.


pkg/ccl/changefeedccl/kvfeed/scanner.go, line 154 at r3 (raw file):

	ctx context.Context, ds *kvcoord.DistSender, targetSpans []roachpb.Span,
) ([]roachpb.Span, error) {
	ranges, err := allRangeSpans(ctx, ds, targetSpans)

nit: push the unwrapped down to here so that in the backport it's easier to just stick an if around getting the ranges using the new logic vs old logic.

Copy link
Member Author

@dt dt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @ajwerner and @HonoreDB)


pkg/ccl/changefeedccl/kvfeed/scanner.go, line 154 at r3 (raw file):

Previously, ajwerner wrote…
	ctx context.Context, ds *kvcoord.DistSender, targetSpans []roachpb.Span,
) ([]roachpb.Span, error) {
	ranges, err := allRangeSpans(ctx, ds, targetSpans)

nit: push the unwrapped down to here so that in the backport it's easier to just stick an if around getting the ranges using the new logic vs old logic.

I think I'm fine backporting the whole change (or none of it), rather than having the backport do an extra if/else here.

Copy link
Member Author

@dt dt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @ajwerner and @HonoreDB)

@craig
Copy link
Contributor

craig bot commented Jan 8, 2021

This PR was included in a batch that was canceled, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented Jan 8, 2021

Build failed:

@dt
Copy link
Member Author

dt commented Jan 8, 2021

bors r+

@craig
Copy link
Contributor

craig bot commented Jan 8, 2021

Build succeeded:

@craig craig bot merged commit 435487a into cockroachdb:master Jan 8, 2021
@dt dt deleted the cdc-in-tenant branch January 19, 2021 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants