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

*: add restriction to running DDL with internal executors #86334

Merged
merged 9 commits into from
Sep 20, 2022

Commits on Sep 20, 2022

  1. *: infuse CollectionFactory for storage and backup

    This is part of the migration of existing DDL statement with internal executor
    to `descs.CollectionFactory.TxnWithExecutor()`. DDL statements should only be
    run with an internal executor that's created via this function.
    
    Release justification: Low risk, high benefit changes to existing functionality
    Release note: none
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    22e7027 View commit details
    Browse the repository at this point in the history
  2. filetable: use CollectionFactory.TxnWithExecutor() for DDL statements

    fixes cockroachdb#76764
    
    Release justification: Low risk, high benefit changes to existing functionality
    Release note: none
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    3c44cad View commit details
    Browse the repository at this point in the history
  3. sql: migreate authorization_test to `CollectionFactory.TxnWithExecuto…

    …r()` for DDLs
    
    This is part of the project to migrate existing DDL statements running with
    an internal executor to `descs.CollectionFactory()`. DDLs are only allowed
    to run with internal executor inited via this function.
    
    Release justification: Low risk, high benefit changes to existing functionality
    Release note: None
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    5a4beb4 View commit details
    Browse the repository at this point in the history
  4. sql: migrate create_external_connection to `planner.WithInternalExecu…

    …tor()` for DDLs
    
    This commit is to migrate the existing DDLs to using
    `planner.WithInternalExecutor()`. DDLs with internal executors are only allowed
    if the latter is bounded with txn-realated metadata.
    
    Release justification: Low risk, high benefit changes to existing functionality
    Release note: none
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    cc0bbc8 View commit details
    Browse the repository at this point in the history
  5. backupccl: migrate job restoration to `CollectionFactory.TxnWithExecu…

    …tor()` for DDLs
    
    This commit is part of the project to migrate DDLs running with internal executor
    with the correct interface. DDLs are only allowed to run with internal executor
    that is bound to txn-related metadata.
    
    Release justification: Low risk, high benefit changes to existing functionality
    Release note: none
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    f2eb031 View commit details
    Browse the repository at this point in the history
  6. backupccl: refactor cleanupTempSystemTables()

    We stripped `txn` from the parameter list in `cleanupTempSystemTables()`.
    It was run with not-nil txn by mistake, which is a mis-usage of running
    internal executor with DDLs.
    
    Release justification: bug fix
    Release note: none
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    e8a4d50 View commit details
    Browse the repository at this point in the history
  7. sql: migrate deleteTempTables to use planner.WithInternalExecutor()

    This is another DDL statement executed via an internal executor mal-inited.
    Change it to use the right interface.
    
    Release justification:
    Release note: none.
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    b458abe View commit details
    Browse the repository at this point in the history
  8. sql: require txn-related metadata if running DDLs with internal execu…

    …tor with txn
    
    When using internal executor to run DDL statements under a not-nil outer txn,
    we require txn-related metadata (such as descriptor collections) to be passed
    to the internal executor from the outer caller too. This commit is to add
    a gate for this use case.
    
    Release justification: bug fix
    Release note: none
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    f362a8f View commit details
    Browse the repository at this point in the history
  9. sql: add a space to a line to fix the lint

    It was causing the lint in CI to fail.
    
    Release note: None
    ZhouXing19 committed Sep 20, 2022
    Configuration menu
    Copy the full SHA
    ebd6076 View commit details
    Browse the repository at this point in the history