changefeedccl, backupresolver: refactor to hold on to mapping of target to descriptor#79260
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Apr 5, 2022
Conversation
Member
d75c933 to
5a4b7fc
Compare
miretskiy
suggested changes
Apr 4, 2022
| // DBs, via either `foo.*` or `DATABASE foo` are noted, as are those explicitly | ||
| // named as DBs (e.g. with `DATABASE foo`, not `foo.*`). These distinctions are | ||
| // used e.g. by RESTORE. | ||
| // used e.g. by RESTORE. tablePatternMap will be populated if non-nil. |
Contributor
There was a problem hiding this comment.
is it really worth it to optimize? Perhaps just return this?
dt
approved these changes
Apr 5, 2022
Contributor
dt
left a comment
There was a problem hiding this comment.
not my package
At some point we should move this to pkg/sql/something, maybe pkg/sql/catalog/targets, since it doesn't really belong in backup's package either.
0492326 to
37ee373
Compare
…et to descriptor Changefeed statements need to resolve a bunch of table names at once, but unlike backups and grants they need to know which returned descriptor corresponded to which input because they (now) take target-specific options. We were reconstructing this awkwardly on the calling side. This PR adds a DescsByTablePattern map to the backupresolver method being used so that it can track which descriptor belongs to which input. Release note: None
37ee373 to
537edf0
Compare
Contributor
Author
|
Okay, done. |
Contributor
Author
|
bors r=[miretskiy,dt] |
1 similar comment
Contributor
Author
|
bors r=[miretskiy,dt] |
Contributor
|
Already running a review |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changefeed statements need to resolve a bunch of table names at once,
but unlike backups and grants they need to know which returned
descriptor corresponded to which input because they (now) take
target-specific options. We were reconstructing this awkwardly on
the calling side. This PR adds an optional parameter to the
backupresolver method being used so that it can track which
descriptor belongs to which input.
I'm probably being overly polite by making this optional,
but hey, it is a little extra memory footprint and not my package.
Release note: None