Skip to content

Commit

Permalink
Merge pull request cockroachdb#24293 from mjibson/schema-gc
Browse files Browse the repository at this point in the history
sql: fail schema changes on GC threshold errors
  • Loading branch information
maddyblue authored Apr 2, 2018
2 parents 1012ed4 + ce14f05 commit 9ba6a6b
Show file tree
Hide file tree
Showing 7 changed files with 555 additions and 215 deletions.
1 change: 1 addition & 0 deletions pkg/roachpb/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions pkg/roachpb/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,3 +647,13 @@ func (e *MixedSuccessError) message(_ *Error) string {
}

var _ ErrorDetailInterface = &MixedSuccessError{}

func (e *BatchTimestampBeforeGCError) Error() string {
return e.message(nil)
}

func (e *BatchTimestampBeforeGCError) message(_ *Error) string {
return fmt.Sprintf("batch timestamp %v must be after GC threshold %v", e.Timestamp, e.Threshold)
}

var _ ErrorDetailInterface = &BatchTimestampBeforeGCError{}
Loading

0 comments on commit 9ba6a6b

Please sign in to comment.