-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
96382: jobs: add VIEWJOB role option r=HonoreDB a=jayshrivastava #### jobs: allow CONTROLJOB users to view all jobs This is a preliminary change before adding the `VIEWJOB` role option. The purpose of the `VIEWJOB` role option will be to allow TSEs to view jobs in admin clusters without modifying them. This requires access to view all jobs, including ones owned by admins. Adding `VIEWJOB` will conflict with the present `CONTROLJOB` implementation. It will be stronger than `CONTROLJOB` because it lets one view admin jobs when `CONTROLJOB` doesn't, yet it will be weaker because it only allows viewing jobs and not pause/cancel/resume-ing them. This change is introduced to make `CONTROLJOB` at least as strong as `VIEWJOB`: it now allows for all jobs to be viewed. In other words, `VIEWJOB` lets you do a subset of things `CONTROLJOB` lets you do. Also, the reason that `CONTROLJOB` prevents access to admin-owned jobs is not well defined. This is tracked in #96432. Release note (general change): Previously, users with the `CONTROLJOB` role option could not view owned by admins (ex. via `SHOW JOBS`). Now, they can. Epic: none --- #### jobs: add VIEWJOB role option Release note (general change): Users can now be granted the `VIEWJOB` role option to be able to view all jobs (ex. via `SHOW JOBS`). This role can be revoked using `NOVIEWJOB`. Epic: none 97746: sql,schemachanger: ADD PRIMARY KEY NOT VALID returns an error r=Xiang-Gu a=Xiang-Gu Fixes #96729 Release note (sql change): When we add an unvalidated PK constraint to a table, assuming its PK was on the implicit "rowid" column, will return an error. This is compatible to what PG will do. 97802: sql: return droppedView instead of nil r=chengxiong-ruan a=chengxiong-ruan In #97631 we refactor the method to drorp index and column cascade dependents. But we didn't return a correct droppedViews for event logging, instead, we returned a nil. This wasn't caught by the `event_log` logic test because we `local-legacy-schema-changer` test config. Though this was caught when backporting to v22.2 because there was a fallback. Epic: None Release note: None Co-authored-by: Jayant Shrivastava <[email protected]> Co-authored-by: Xiang Gu <[email protected]> Co-authored-by: Chengxiong Ruan <[email protected]>
- Loading branch information
Showing
21 changed files
with
1,289 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -555,5 +555,5 @@ func (p *planner) removeDependents( | |
} | ||
} | ||
} | ||
return nil, nil | ||
return droppedViews, nil | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.