backupccl: change the error code for "file already exists" errors#43221
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Dec 17, 2019
Merged
backupccl: change the error code for "file already exists" errors#43221craig[bot] merged 1 commit intocockroachdb:masterfrom
craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
The backup code used to use a class 58 error code ("system error") for
situations where a backup target already exists - DuplicateFile. Class
58 is the wrong one, particularly since we've started using 58 errors to
represent errors about the state of the cluster (range unavailable,
dropped connections). So clients should treat 58 errors as retriable
(and for example the scaledata tests do). This patch switches to a new
code in "Class 42 - Syntax or Access Rule Violation".
It's hard to imagine that Postgres returns the 58 code for anything
related to user input.
Release note (sql change): The error code for backups which would
overwrite files changed from class 58 ("system") to class 42 ("Syntax or
Access Rule Violation").
Member
dt
approved these changes
Dec 17, 2019
knz
approved these changes
Dec 17, 2019
Contributor
knz
left a comment
There was a problem hiding this comment.
Reviewed 2 of 2 files at r1.
Reviewable status:complete! 1 of 0 LGTMs obtained
andreimatei
commented
Dec 17, 2019
Contributor
Author
andreimatei
left a comment
There was a problem hiding this comment.
bors r+
Reviewable status:
complete! 1 of 0 LGTMs obtained
craig bot
pushed a commit
that referenced
this pull request
Dec 17, 2019
43023: sql: acceptance test and test cleanup for TimeTZ r=otan a=otan Resolves #26097. This PR completes the TimeTZ saga! * Added Java unit tests * Removed some tests from the test whitelist * Added postgres regress suite. Fix parse error to use New instead of Wrap, as the Wrap actually confuses the error message more. Release note (sql change): This PR (along with a string of past PRs) allows the usage of TimeTZ throughout cockroach. 43208: blobs: Reduce file size of benchmark tests r=g3orgia a=g3orgia As titled. Release note: None 43221: backupccl: change the error code for "file already exists" errors r=andreimatei a=andreimatei The backup code used to use a class 58 error code ("system error") for situations where a backup target already exists - DuplicateFile. Class 58 is the wrong one, particularly since we've started using 58 errors to represent errors about the state of the cluster (range unavailable, dropped connections). So clients should treat 58 errors as retriable (and for example the scaledata tests do). This patch switches to a new code in "Class 42 - Syntax or Access Rule Violation". It's hard to imagine that Postgres returns the 58 code for anything related to user input. Release note (sql change): The error code for backups which would overwrite files changed from class 58 ("system") to class 42 ("Syntax or Access Rule Violation"). 43240: storage/engine: small logging fixes r=petermattis a=petermattis Change `Pebble.GetCompactionStats` to be prefixed with a newline to match the formatting of RocksDB. This ensures that the compaction stats display will not contain the log prefix which was misaligning the table header. Adding a missing sort to `Pebble.GetSSTables`. This was causing the sstable summary log message to be much busier than for RocksDB because `SSTableInfos.String` expects the infos to be sorted. Move the formatting of `estimated_pending_compaction_bytes: x` into `RocksDB.GetCompactionStats`. The Pebble compaction stats already included this and it is useful to see the estimated pending compaction bytes whenever the compaction stats are output. Release note: None Co-authored-by: Oliver Tan <otan@cockroachlabs.com> Co-authored-by: Georgia Hong <georgiah@cockroachlabs.com> Co-authored-by: Andrei Matei <andrei@cockroachlabs.com> Co-authored-by: Peter Mattis <petermattis@gmail.com>
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.
The backup code used to use a class 58 error code ("system error") for
situations where a backup target already exists - DuplicateFile. Class
58 is the wrong one, particularly since we've started using 58 errors to
represent errors about the state of the cluster (range unavailable,
dropped connections). So clients should treat 58 errors as retriable
(and for example the scaledata tests do). This patch switches to a new
code in "Class 42 - Syntax or Access Rule Violation".
It's hard to imagine that Postgres returns the 58 code for anything
related to user input.
Release note (sql change): The error code for backups which would
overwrite files changed from class 58 ("system") to class 42 ("Syntax or
Access Rule Violation").