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
sql: ensure that a table cannot be read before its creation time #17378
Conversation
I think you also need to set ModificationTime on the descriptor created by createViewNode. Reviewed 3 of 3 files at r1. Comments from Reviewable |
Good point! I'll rework this PR to take care of that, but doesn't bode well for how we're organizing the code! Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed. Comments from Reviewable |
The correct way to do this is to capture the common logic in an API, i.e. move forward on #17188 and solve this problem there. |
@andreimatei this is ready for review. Thanks! |
Reviewed 3 of 3 files at r2. pkg/sql/create.go, line 628 at r2 (raw file):
Instead, please make all 3 functions makeTableDescIfAs, MakeTableDesc and makeViewTableDesc call your new function pkg/sql/create.go, line 1226 at r2 (raw file):
I strongly recommend extending the prototype of Comments from Reviewable |
Review status: 2 of 7 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending. pkg/sql/create.go, line 628 at r2 (raw file): Previously, knz (kena) wrote…
Done. pkg/sql/create.go, line 1226 at r2 (raw file): Previously, knz (kena) wrote…
Done. I've added a new commit to this PR for further work. I'll ask @mjibson help me figure out what timestamp I aught to pass in here Comments from Reviewable |
LGTM but let's take some input from a member of the bulk i/o team. Reviewed 5 of 5 files at r3. pkg/ccl/sqlccl/csv.go, line 164 at r3 (raw file):
Maybe add a TODO comment here and below. Unless Matt has a suggestion straight away. Comments from Reviewable |
@mjibson I'd like your input on what value to pass in as the creation timestamp for the tables being restored. This PR is blocked on that. Thanks! |
We should pass in the start time of the backup descriptor. |
No description provided.