Skip to content

Commit

Permalink
errors(ticdc): remove confusing "key" in error message
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Shen <[email protected]>
  • Loading branch information
overvenus committed Jan 27, 2022
1 parent 3d48f0c commit ed487cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ campaign owner failed

["CDC:ErrCaptureNotExist"]
error = '''
capture not exists, key: %s
capture not exists, %s
'''

["CDC:ErrCaptureRegister"]
Expand All @@ -123,12 +123,12 @@ capture suicide

["CDC:ErrChangeFeedAlreadyExists"]
error = '''
changefeed already exists, key: %s
changefeed already exists, %s
'''

["CDC:ErrChangeFeedNotExists"]
error = '''
changefeed not exists, key: %s
changefeed not exists, %s
'''

["CDC:ErrChangefeedAbnormalState"]
Expand Down Expand Up @@ -978,12 +978,12 @@ fail to create changefeed because target-ts %d is earlier than start-ts %d

["CDC:ErrTaskPositionNotExists"]
error = '''
task position not exists, key: %s
task position not exists, %s
'''

["CDC:ErrTaskStatusNotExists"]
error = '''
task status not exists, key: %s
task status not exists, %s
'''

["CDC:ErrTiKVEventFeed"]
Expand Down
10 changes: 5 additions & 5 deletions pkg/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
var (
// kv related errors
ErrWriteTsConflict = errors.Normalize("write ts conflict", errors.RFCCodeText("CDC:ErrWriteTsConflict"))
ErrChangeFeedNotExists = errors.Normalize("changefeed not exists, key: %s", errors.RFCCodeText("CDC:ErrChangeFeedNotExists"))
ErrChangeFeedAlreadyExists = errors.Normalize("changefeed already exists, key: %s", errors.RFCCodeText("CDC:ErrChangeFeedAlreadyExists"))
ErrTaskStatusNotExists = errors.Normalize("task status not exists, key: %s", errors.RFCCodeText("CDC:ErrTaskStatusNotExists"))
ErrTaskPositionNotExists = errors.Normalize("task position not exists, key: %s", errors.RFCCodeText("CDC:ErrTaskPositionNotExists"))
ErrCaptureNotExist = errors.Normalize("capture not exists, key: %s", errors.RFCCodeText("CDC:ErrCaptureNotExist"))
ErrChangeFeedNotExists = errors.Normalize("changefeed not exists, %s", errors.RFCCodeText("CDC:ErrChangeFeedNotExists"))
ErrChangeFeedAlreadyExists = errors.Normalize("changefeed already exists, %s", errors.RFCCodeText("CDC:ErrChangeFeedAlreadyExists"))
ErrTaskStatusNotExists = errors.Normalize("task status not exists, %s", errors.RFCCodeText("CDC:ErrTaskStatusNotExists"))
ErrTaskPositionNotExists = errors.Normalize("task position not exists, %s", errors.RFCCodeText("CDC:ErrTaskPositionNotExists"))
ErrCaptureNotExist = errors.Normalize("capture not exists, %s", errors.RFCCodeText("CDC:ErrCaptureNotExist"))
ErrGetAllStoresFailed = errors.Normalize("get stores from pd failed", errors.RFCCodeText("CDC:ErrGetAllStoresFailed"))
ErrMetaListDatabases = errors.Normalize("meta store list databases", errors.RFCCodeText("CDC:ErrMetaListDatabases"))
ErrGRPCDialFailed = errors.Normalize("grpc dial failed", errors.RFCCodeText("CDC:ErrGRPCDialFailed"))
Expand Down

0 comments on commit ed487cc

Please sign in to comment.