forked from pingcap/dm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error_list.go
1218 lines (1144 loc) · 103 KB
/
error_list.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2019 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
package terror
// Database operation error code list.
const (
codeDBDriverError ErrCode = iota + 10001
codeDBBadConn
codeDBInvalidConn
codeDBUnExpect
codeDBQueryFailed
codeDBExecuteFailed
)
// Functional error code list.
const (
codeParseMydumperMeta ErrCode = iota + 11001
codeGetFileSize
codeDropMultipleTables
codeRenameMultipleTables
codeAlterMultipleTables
codeParseSQL
codeUnknownTypeDDL
codeRestoreASTNode
codeParseGTID
codeNotSupportedFlavor
codeNotMySQLGTID
codeNotMariaDBGTID
codeNotUUIDString
codeMariaDBDomainID
codeInvalidServerID
codeGetSQLModeFromStr
codeVerifySQLOperateArgs
codeStatFileSize
codeReaderAlreadyRunning
codeReaderAlreadyStarted
codeReaderStateCannotClose
codeReaderShouldStartSync
// pkg/streamer.
codeEmptyRelayDir
codeReadDir
codeBaseFileNotFound
codeBinFileCmpCondNotSupport
codeBinlogFileNotValid
codeBinlogFilesNotFound
codeGetRelayLogStat
codeAddWatchForRelayLogDir
codeWatcherStart
codeWatcherChanClosed
codeWatcherChanRecvError
codeRelayLogFileSizeSmaller
codeBinlogFileNotSpecified
codeNoRelayLogMatchPos
codeFirstRelayLogNotMatchPos
codeParserParseRelayLog
codeNoSubdirToSwitch
codeNeedSyncAgain
codeSyncClosed
// pkg/utils.
codeSchemaTableNameNotValid
codeGenTableRouter
codeEncryptSecretKeyNotValid
codeEncryptGenCipher
codeEncryptGenIV
codeCiphertextLenNotValid
codeCiphertextContextNotValid
codeInvalidBinlogPosStr
codeEncCipherTextBase64Decode
// pkg/binlog.
codeBinlogWriteBinaryData
codeBinlogWriteDataToBuffer
codeBinlogHeaderLengthNotValid
codeBinlogEventDecode
codeBinlogEmptyNextBinName
codeBinlogParseSID
codeBinlogEmptyGTID
codeBinlogGTIDSetNotValid
codeBinlogGTIDMySQLNotValid
codeBinlogGTIDMariaDBNotValid
codeBinlogMariaDBServerIDMismatch
codeBinlogOnlyOneGTIDSupport
codeBinlogOnlyOneIntervalInUUID
codeBinlogIntervalValueNotValid
codeBinlogEmptyQuery
codeBinlogTableMapEvNotValid
codeBinlogExpectFormatDescEv
codeBinlogExpectTableMapEv
codeBinlogExpectRowsEv
codeBinlogUnexpectedEv
codeBinlogParseSingleEv
codeBinlogEventTypeNotValid
codeBinlogEventNoRows
codeBinlogEventNoColumns
codeBinlogEventRowLengthNotEq
codeBinlogColumnTypeNotSupport
codeBinlogGoMySQLTypeNotSupport
codeBinlogColumnTypeMisMatch
codeBinlogDummyEvSizeTooSmall
codeBinlogFlavorNotSupport
codeBinlogDMLEmptyData
codeBinlogLatestGTIDNotInPrev
codeBinlogReadFileByGTID
codeBinlogWriterNotStateNew
codeBinlogWriterStateCannotClose
codeBinlogWriterNeedStart
codeBinlogWriterOpenFile
codeBinlogWriterGetFileStat
codeBinlogWriterWriteDataLen
codeBinlogWriterFileNotOpened
codeBinlogWriterFileSync
codeBinlogPrevGTIDEvNotValid
codeBinlogDecodeMySQLGTIDSet
codeBinlogNeedMariaDBGTIDSet
codeBinlogParseMariaDBGTIDSet
codeBinlogMariaDBAddGTIDSet
// pkg/tracing.
codeTracingEventDataNotValid
codeTracingUploadData
codeTracingEventTypeNotValid
codeTracingGetTraceCode
codeTracingDataChecksum
codeTracingGetTSO
// pkg/backoff.
codeBackoffArgsNotValid
codeInitLoggerFail
// pkg/gtid.
codeGTIDTruncateInvalid
// pkg/streamer.
codeRelayLogGivenPosTooBig
// pkg/election.
codeElectionCampaignFail
codeElectionGetLeaderIDFail
// pkg/binlog.
codeBinlogInvalidFilenameWithUUIDSuffix
// dm/common.
codeDecodeEtcdKeyFail
// pkg/shardddl/optimism.
codeShardDDLOptimismTrySyncFail
// pkg/conn.
codeConnInvalidTLSConfig
codeConnRegistryTLSConfig
// pkg/upgrade.
codeUpgradeVersionEtcdFail
// pkg/v1workermeta.
codeInvalidV1WorkerMetaPath
// pkg/v1dbschema.
codeFailUpdateV1DBSchema
// pkg/binlog.
codeBinlogStatusVarsParse
// dm/command.
codeVerifyHandleErrorArgs
// pkg/parser.
codeRewriteSQL
// pkg/streamer.
codeNoUUIDDirMatchGTID
codeNoRelayPosMatchGTID
codeReaderReachEndOfFile
// pkg/dumpling.
codeMetadataNoBinlogLoc
// pkg/streamer.
codePreviousGTIDNotExist
)
// Config related error code list.
const (
codeConfigCheckItemNotSupport ErrCode = iota + 20001
codeConfigTomlTransform
codeConfigYamlTransform
codeConfigTaskNameEmpty
codeConfigEmptySourceID
codeConfigTooLongSourceID
codeConfigOnlineSchemeNotSupport
codeConfigInvalidTimezone
codeConfigParseFlagSet
codeConfigDecryptDBPassword
codeConfigMetaInvalid
codeConfigMySQLInstNotFound
codeConfigMySQLInstsAtLeastOne
codeConfigMySQLInstSameSourceID
codeConfigMydumperCfgConflict
codeConfigLoaderCfgConflict
codeConfigSyncerCfgConflict
codeConfigReadCfgFromFile
codeConfigNeedUniqueTaskName
codeConfigInvalidTaskMode
codeConfigNeedTargetDB
codeConfigMetadataNotSet
codeConfigRouteRuleNotFound
codeConfigFilterRuleNotFound
codeConfigColumnMappingNotFound
codeConfigBAListNotFound
codeConfigMydumperCfgNotFound
codeConfigMydumperPathNotValid
codeConfigLoaderCfgNotFound
codeConfigSyncerCfgNotFound
codeConfigSourceIDNotFound
codeConfigDuplicateCfgItem
codeConfigShardModeNotSupport
codeConfigMoreThanOne
codeConfigEtcdParse
codeConfigMissingForBound
codeConfigBinlogEventFilter
codeConfigGlobalConfigsUnused
)
// Binlog operation error code list.
const (
codeBinlogExtractPosition ErrCode = iota + 22001
codeBinlogInvalidFilename
codeBinlogParsePosFromStr
)
// Checkpoint error code.
const (
codeCheckpointInvalidTaskMode ErrCode = iota + 24001
codeCheckpointSaveInvalidPos
codeCheckpointInvalidTableFile
codeCheckpointDBNotExistInFile
codeCheckpointTableNotExistInFile
codeCheckpointRestoreCountGreater
)
// Task check error code.
const (
codeTaskCheckSameTableName ErrCode = iota + 26001
codeTaskCheckFailedOpenDB
codeTaskCheckGenTableRouter
codeTaskCheckGenColumnMapping
codeTaskCheckSyncConfigError
codeTaskCheckGenBAList
codeSourceCheckGTID
)
// Relay log utils error code.
const (
codeRelayParseUUIDIndex ErrCode = iota + 28001
codeRelayParseUUIDSuffix
codeRelayUUIDWithSuffixNotFound
codeRelayGenFakeRotateEvent
codeRelayNoValidRelaySubDir
)
// Relay unit error code.
const (
codeRelayUUIDSuffixNotValid ErrCode = iota + 30001
codeRelayUUIDSuffixLessThanPrev
codeRelayLoadMetaData
codeRelayBinlogNameNotValid
codeRelayNoCurrentUUID
codeRelayFlushLocalMeta
codeRelayUpdateIndexFile
codeRelayLogDirpathEmpty
codeRelayReaderNotStateNew
codeRelayReaderStateCannotClose
codeRelayReaderNeedStart
codeRelayTCPReaderStartSync
codeRelayTCPReaderNilGTID
codeRelayTCPReaderStartSyncGTID
codeRelayTCPReaderGetEvent
codeRelayWriterNotStateNew
codeRelayWriterStateCannotClose
codeRelayWriterNeedStart
codeRelayWriterNotOpened
codeRelayWriterExpectRotateEv
codeRelayWriterRotateEvWithNoWriter
codeRelayWriterStatusNotValid
codeRelayWriterGetFileStat
codeRelayWriterLatestPosGTFileSize
codeRelayWriterFileOperate
codeRelayCheckBinlogFileHeaderExist
codeRelayCheckFormatDescEventExist
codeRelayCheckFormatDescEventParseEv
codeRelayCheckIsDuplicateEvent
codeRelayUpdateGTID
codeRelayNeedPrevGTIDEvBeforeGTIDEv
codeRelayNeedMaGTIDListEvBeforeGTIDEv
codeRelayMkdir
codeRelaySwitchMasterNeedGTID
codeRelayThisStrategyIsPurging
codeRelayOtherStrategyIsPurging
codeRelayPurgeIsForbidden
codeRelayNoActiveRelayLog
codeRelayPurgeRequestNotValid
codeRelayTrimUUIDNotFound
codeRelayRemoveFileFail
codeRelayPurgeArgsNotValid
codePreviousGTIDsNotValid
codeRotateEventWithDifferentServerID
)
// Dump unit error code.
const (
codeDumpUnitRuntime ErrCode = iota + 32001
codeDumpUnitGenTableRouter
codeDumpUnitGenBAList
codeDumpUnitGlobalLock
)
// Load unit error code.
const (
codeLoadUnitCreateSchemaFile ErrCode = iota + 34001
codeLoadUnitInvalidFileEnding
codeLoadUnitParseQuoteValues
codeLoadUnitDoColumnMapping
codeLoadUnitReadSchemaFile
codeLoadUnitParseStatement
codeLoadUnitNotCreateTable
codeLoadUnitDispatchSQLFromFile
codeLoadUnitInvalidInsertSQL
codeLoadUnitGenTableRouter
codeLoadUnitGenColumnMapping
codeLoadUnitNoDBFile
codeLoadUnitNoTableFile
codeLoadUnitDumpDirNotFound
codeLoadUnitDuplicateTableFile
codeLoadUnitGenBAList
)
// Sync unit error code.
const (
codeSyncerUnitPanic ErrCode = iota + 36001
codeSyncUnitInvalidTableName
codeSyncUnitTableNameQuery
codeSyncUnitNotSupportedDML
codeSyncUnitAddTableInSharding
codeSyncUnitDropSchemaTableInSharding
codeSyncUnitInvalidShardMeta
codeSyncUnitDDLWrongSequence
codeSyncUnitDDLActiveIndexLarger
codeSyncUnitDupTableGroup
codeSyncUnitShardingGroupNotFound
codeSyncUnitSafeModeSetCount
codeSyncUnitCausalityConflict
codeSyncUnitDMLStatementFound
codeSyncerUnitBinlogEventFilter
codeSyncerUnitInvalidReplicaEvent
codeSyncerUnitParseStmt
codeSyncerUnitUUIDNotLatest
codeSyncerUnitDDLExecChanCloseOrBusy
codeSyncerUnitDDLChanDone
codeSyncerUnitDDLChanCanceled
codeSyncerUnitDDLOnMultipleTable
codeSyncerUnitInjectDDLOnly
codeSyncerUnitInjectDDLWithoutSchema
codeSyncerUnitNotSupportedOperate
codeSyncerUnitNilOperatorReq
codeSyncerUnitDMLColumnNotMatch
codeSyncerUnitDMLOldNewValueMismatch
codeSyncerUnitDMLPruneColumnMismatch
codeSyncerUnitGenBinlogEventFilter
codeSyncerUnitGenTableRouter
codeSyncerUnitGenColumnMapping
codeSyncerUnitDoColumnMapping
codeSyncerUnitCacheKeyNotFound
codeSyncerUnitHeartbeatCheckConfig
codeSyncerUnitHeartbeatRecordExists
codeSyncerUnitHeartbeatRecordNotFound
codeSyncerUnitHeartbeatRecordNotValid
codeSyncerUnitOnlineDDLInvalidMeta
codeSyncerUnitOnlineDDLSchemeNotSupport
codeSyncerUnitOnlineDDLOnMultipleTable
codeSyncerUnitGhostApplyEmptyTable
codeSyncerUnitGhostRenameTableNotValid
codeSyncerUnitGhostRenameToGhostTable
codeSyncerUnitGhostRenameGhostTblToOther
codeSyncerUnitGhostOnlineDDLOnGhostTbl
codeSyncerUnitPTApplyEmptyTable
codeSyncerUnitPTRenameTableNotValid
codeSyncerUnitPTRenameToPTTable
codeSyncerUnitPTRenamePTTblToOther
codeSyncerUnitPTOnlineDDLOnPTTbl
codeSyncerUnitRemoteSteamerWithGTID
codeSyncerUnitRemoteSteamerStartSync
codeSyncerUnitGetTableFromDB
codeSyncerUnitFirstEndPosNotFound
codeSyncerUnitResolveCasualityFail
codeSyncerUnitReopenStreamNotSupport
codeSyncerUnitUpdateConfigInSharding
codeSyncerUnitExecWithNoBlockingDDL
codeSyncerUnitGenBAList
codeSyncerUnitHandleDDLFailed
codeSyncerShardDDLConflict
codeSyncerFailpoint
codeSyncerReplaceEvent
codeSyncerOperatorNotExist
codeSyncerReplaceEventNotExist
codeSyncerParseDDL
codeSyncerUnsupportedStmt
)
// DM-master error code.
const (
codeMasterSQLOpNilRequest ErrCode = iota + 38001
codeMasterSQLOpNotSupport
codeMasterSQLOpWithoutSharding
codeMasterGRPCCreateConn
codeMasterGRPCSendOnCloseConn
codeMasterGRPCClientClose
codeMasterGRPCInvalidReqType
codeMasterGRPCRequestError
codeMasterDeployMapperVerify
codeMasterConfigParseFlagSet
codeMasterConfigUnknownItem
codeMasterConfigInvalidFlag
codeMasterConfigTomlTransform
codeMasterConfigTimeoutParse
codeMasterConfigUpdateCfgFile
codeMasterShardingDDLDiff
codeMasterStartService
codeMasterNoEmitToken
codeMasterLockNotFound
codeMasterLockIsResolving
codeMasterWorkerCliNotFound
codeMasterWorkerNotWaitLock
codeMasterHandleSQLReqFail
codeMasterOwnerExecDDL
codeMasterPartWorkerExecDDLFail
codeMasterWorkerExistDDLLock
codeMasterGetWorkerCfgExtractor
codeMasterTaskConfigExtractor
codeMasterWorkerArgsExtractor
codeMasterQueryWorkerConfig
codeMasterOperNotFound
codeMasterOperRespNotSuccess
codeMasterOperRequestTimeout
codeMasterHandleHTTPApis
codeMasterHostPortNotValid
codeMasterGetHostnameFail
codeMasterGenEmbedEtcdConfigFail
codeMasterStartEmbedEtcdFail
codeMasterParseURLFail
codeMasterJoinEmbedEtcdFail
codeMasterInvalidOperateOp
codeMasterAdvertiseAddrNotValid
codeMasterRequestIsNotForwardToLeader
codeMasterIsNotAsyncRequest
codeMasterFailToGetExpectResult
codeMasterPessimistNotStarted
codeMasterOptimistNotStarted
codeMasterMasterNameNotExist
codeMasterInvalidOfflineType
codeMasterAdvertisePeerURLsNotValid
codeMasterTLSConfigNotValid
codeMasterBoundChanging
codeMasterFailToImportFromV10x
codeMasterInconsistentOptimistDDLsAndInfo
codeMasterOptimisticTableInfobeforeNotExist
)
// DM-worker error code.
const (
codeWorkerParseFlagSet ErrCode = iota + 40001
codeWorkerInvalidFlag
codeWorkerDecodeConfigFromFile
codeWorkerUndecodedItemFromFile
codeWorkerNeedSourceID
codeWorkerTooLongSourceID
codeWorkerRelayBinlogName
codeWorkerWriteConfigFile
codeWorkerLogInvalidHandler
codeWorkerLogPointerInvalid
codeWorkerLogFetchPointer
codeWorkerLogUnmarshalPointer
codeWorkerLogClearPointer
codeWorkerLogTaskKeyNotValid
codeWorkerLogUnmarshalTaskKey
codeWorkerLogFetchLogIter
codeWorkerLogGetTaskLog
codeWorkerLogUnmarshalBinary
codeWorkerLogForwardPointer
codeWorkerLogMarshalTask
codeWorkerLogSaveTask
codeWorkerLogDeleteKV
codeWorkerLogDeleteKVIter
codeWorkerLogUnmarshalTaskMeta
codeWorkerLogFetchTaskFromMeta
codeWorkerLogVerifyTaskMeta
codeWorkerLogSaveTaskMeta
codeWorkerLogGetTaskMeta
codeWorkerLogDeleteTaskMeta
codeWorkerMetaTomlTransform
codeWorkerMetaOldFileStat
codeWorkerMetaOldReadFile
codeWorkerMetaEncodeTask
codeWorkerMetaRemoveOldDir
codeWorkerMetaTaskLogNotFound
codeWorkerMetaHandleTaskOrder
codeWorkerMetaOpenTxn
codeWorkerMetaCommitTxn
codeWorkerRelayStageNotValid
codeWorkerRelayOperNotSupport
codeWorkerOpenKVDBFile
codeWorkerUpgradeCheckKVDir
codeWorkerMarshalVerBinary
codeWorkerUnmarshalVerBinary
codeWorkerGetVersionFromKV
codeWorkerSaveVersionToKV
codeWorkerVerAutoDowngrade
codeWorkerStartService
codeWorkerAlreadyClosed
codeWorkerNotRunningStage
codeWorkerNotPausedStage
codeWorkerUpdateTaskStage
codeWorkerMigrateStopRelay
codeWorkerSubTaskNotFound
codeWorkerSubTaskExists
codeWorkerOperSyncUnitOnly
codeWorkerRelayUnitStage
codeWorkerNoSyncerRunning
codeWorkerCannotUpdateSourceID
codeWorkerNoAvailUnits
codeWorkerDDLLockInfoNotFound
codeWorkerDDLLockInfoExists
codeWorkerCacheDDLInfoExists
codeWorkerExecSkipDDLConflict
codeWorkerExecDDLSyncerOnly
codeWorkerExecDDLTimeout
codeWorkerWaitRelayCatchupTimeout
codeWorkerRelayIsPurging
codeWorkerHostPortNotValid
codeWorkerNoStart
codeWorkerAlreadyStarted
codeWorkerSourceNotMatch
codeWorkerFailToGetSubtaskConfigFromEtcd
codeWorkerFailToGetSourceConfigFromEtcd
codeWorkerDDLLockOpNotFound
codeWorkerTLSConfigNotValid
codeWorkerFailConnectMaster
codeWorkerWaitRelayCatchupGTID
codeWorkerRelayConfigChanging
)
// DM-tracer error code.
const (
codeTracerParseFlagSet ErrCode = iota + 42001
codeTracerConfigTomlTransform
codeTracerConfigInvalidFlag
codeTracerTraceEventNotFound
codeTracerTraceIDNotProvided
codeTracerParamNotValid
codeTracerPostMethodOnly
codeTracerEventAssertionFail
codeTracerEventTypeNotValid
codeTracerStartService
)
// Schema-tracker error code.
const (
codeSchemaTrackerInvalidJSON ErrCode = iota + 44001
codeSchemaTrackerCannotCreateSchema
codeSchemaTrackerCannotCreateTable
codeSchemaTrackerCannotSerialize
codeSchemaTrackerCannotGetTable
codeSchemaTrackerCannotExecDDL
codeSchemaTrackerCannotFetchDownstreamTable
codeSchemaTrackerCannotParseDownstreamTable
codeSchemaTrackerInvalidCreateTableStmt
codeSchemaTrackerRestoreStmtFail
codeSchemaTrackerCannotDropTable
codeSchemaTrackerInit
)
// HA scheduler.
const (
codeSchedulerNotStarted ErrCode = iota + 46001
codeSchedulerStarted
codeSchedulerWorkerExist
codeSchedulerWorkerNotExist
codeSchedulerWorkerOnline
codeSchedulerWorkerInvalidTrans
codeSchedulerSourceCfgExist
codeSchedulerSourceCfgNotExist
codeSchedulerSourcesUnbound
codeSchedulerSourceOpTaskExist
codeSchedulerRelayStageInvalidUpdate
codeSchedulerRelayStageSourceNotExist
codeSchedulerMultiTask
codeSchedulerSubTaskExist
codeSchedulerSubTaskStageInvalidUpdate
codeSchedulerSubTaskOpTaskNotExist
codeSchedulerSubTaskOpSourceNotExist
codeSchedulerTaskNotExist
codeSchedulerRequireNotRunning
codeSchedulerRelayWorkersBusy
codeSchedulerRelayWorkersBound
codeSchedulerRelayWorkersWrongRelay
codeSchedulerSourceOpRelayExist
)
// dmctl error code.
const (
codeCtlGRPCCreateConn ErrCode = iota + 48001
codeCtlInvalidTLSCfg
)
// default error code.
const (
codeNotSet ErrCode = iota + 50000
)
// Error instances.
var (
// Database operation related error.
ErrDBDriverError = New(codeDBDriverError, ClassDatabase, ScopeNotSet, LevelHigh, "database driver error", "Please check the database connection and the database config in configuration file.")
ErrDBBadConn = New(codeDBBadConn, ClassDatabase, ScopeNotSet, LevelHigh, "database driver", "Please check the database connection, then use `pause-task` to pause the task and then use `resume-task` to resume the task.")
ErrDBInvalidConn = New(codeDBInvalidConn, ClassDatabase, ScopeNotSet, LevelHigh, "database driver", "Please check the database connection, then use `pause-task` to stop the task and then use `resume-task` to resume the task.")
ErrDBUnExpect = New(codeDBUnExpect, ClassDatabase, ScopeNotSet, LevelHigh, "unexpect database error: %s", "")
ErrDBQueryFailed = New(codeDBQueryFailed, ClassDatabase, ScopeNotSet, LevelHigh, "query statement failed: %s", "")
ErrDBExecuteFailed = New(codeDBExecuteFailed, ClassDatabase, ScopeNotSet, LevelHigh, "execute statement failed: %s", "")
// Functional error.
ErrParseMydumperMeta = New(codeParseMydumperMeta, ClassFunctional, ScopeInternal, LevelHigh, "parse mydumper metadata error: %s, metadata: %s", "")
ErrGetFileSize = New(codeGetFileSize, ClassFunctional, ScopeInternal, LevelHigh, "get file %s size", "")
ErrDropMultipleTables = New(codeDropMultipleTables, ClassFunctional, ScopeInternal, LevelHigh, "not allowed operation: drop multiple tables in one statement", "It is recommended to include only one DDL operation in a statement executed upstream. Please manually handle it using dmctl (skipping the DDL statement or replacing the DDL statement with a specified DDL statement). For details, see https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements")
ErrRenameMultipleTables = New(codeRenameMultipleTables, ClassFunctional, ScopeInternal, LevelHigh, "not allowed operation: rename multiple tables in one statement", "It is recommended to include only one DDL operation in a statement executed upstream. Please manually handle it using dmctl (skipping the DDL statement or replacing the DDL statement with a specified DDL statement). For details, see https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements")
ErrAlterMultipleTables = New(codeAlterMultipleTables, ClassFunctional, ScopeInternal, LevelHigh, "not allowed operation: alter multiple tables in one statement", "It is recommended to include only one DDL operation in a statement executed upstream. Please manually handle it using dmctl (skipping the DDL statement or replacing the DDL statement with a specified DDL statement). For details, see https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements")
ErrParseSQL = New(codeParseSQL, ClassFunctional, ScopeInternal, LevelHigh, "parse statement: %s", "")
ErrUnknownTypeDDL = New(codeUnknownTypeDDL, ClassFunctional, ScopeInternal, LevelHigh, "unknown type ddl %+v", "Please manually handle it using dmctl (skipping the DDL statement or replacing the DDL statement with a specified DDL statement). For details, see https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements")
ErrRestoreASTNode = New(codeRestoreASTNode, ClassFunctional, ScopeInternal, LevelHigh, "restore ast node", "")
ErrParseGTID = New(codeParseGTID, ClassFunctional, ScopeInternal, LevelHigh, "parse GTID %s", "")
ErrNotSupportedFlavor = New(codeNotSupportedFlavor, ClassFunctional, ScopeInternal, LevelHigh, "flavor %s not supported", "Please check `flavor` config in source configuration file.")
ErrNotMySQLGTID = New(codeNotMySQLGTID, ClassFunctional, ScopeInternal, LevelHigh, "%s is not mysql GTID set", "")
ErrNotMariaDBGTID = New(codeNotMariaDBGTID, ClassFunctional, ScopeInternal, LevelHigh, "%s is not mariadb GTID set", "")
ErrNotUUIDString = New(codeNotUUIDString, ClassFunctional, ScopeInternal, LevelHigh, "%v is not UUID string", "")
ErrMariaDBDomainID = New(codeMariaDBDomainID, ClassFunctional, ScopeInternal, LevelHigh, "%v is not uint32", "")
ErrInvalidServerID = New(codeInvalidServerID, ClassFunctional, ScopeInternal, LevelHigh, "invalid server id %s", "")
ErrGetSQLModeFromStr = New(codeGetSQLModeFromStr, ClassFunctional, ScopeInternal, LevelHigh, "get sql mode from string literal %s", "")
ErrVerifySQLOperateArgs = New(codeVerifySQLOperateArgs, ClassFunctional, ScopeInternal, LevelLow, "", "Please make sure the args are correct.")
ErrStatFileSize = New(codeStatFileSize, ClassFunctional, ScopeInternal, LevelHigh, "get file statfs", "")
ErrReaderAlreadyRunning = New(codeReaderAlreadyRunning, ClassFunctional, ScopeInternal, LevelHigh, "binlog reader is already running", "")
ErrReaderAlreadyStarted = New(codeReaderAlreadyStarted, ClassFunctional, ScopeInternal, LevelHigh, "stage %s, expect %s, already started", "")
ErrReaderStateCannotClose = New(codeReaderStateCannotClose, ClassFunctional, ScopeInternal, LevelHigh, "stage %s, expect %s, can not close", "")
ErrReaderShouldStartSync = New(codeReaderShouldStartSync, ClassFunctional, ScopeInternal, LevelHigh, "stage %s, expect %s", "")
// pkg/streamer.
ErrEmptyRelayDir = New(codeEmptyRelayDir, ClassFunctional, ScopeInternal, LevelHigh, "empty relay dir", "Please check `relay-dir` config in task configuration file.")
ErrReadDir = New(codeReadDir, ClassFunctional, ScopeInternal, LevelHigh, "read dir: %s", "")
ErrBaseFileNotFound = New(codeBaseFileNotFound, ClassFunctional, ScopeInternal, LevelHigh, "base file %s in directory %s not found", "")
ErrBinFileCmpCondNotSupport = New(codeBinFileCmpCondNotSupport, ClassFunctional, ScopeInternal, LevelHigh, "cmp condition %v not supported", "")
ErrBinlogFileNotValid = New(codeBinlogFileNotValid, ClassFunctional, ScopeInternal, LevelHigh, "binlog file %s not valid", "")
ErrBinlogFilesNotFound = New(codeBinlogFilesNotFound, ClassFunctional, ScopeInternal, LevelHigh, "binlog files in dir %s not found", "")
ErrGetRelayLogStat = New(codeGetRelayLogStat, ClassFunctional, ScopeInternal, LevelHigh, "get stat for relay log %s", "")
ErrAddWatchForRelayLogDir = New(codeAddWatchForRelayLogDir, ClassFunctional, ScopeInternal, LevelHigh, "add watch for relay log dir %s", "")
ErrWatcherStart = New(codeWatcherStart, ClassFunctional, ScopeInternal, LevelHigh, "watcher starts for relay log dir %s", "")
ErrWatcherChanClosed = New(codeWatcherChanClosed, ClassFunctional, ScopeInternal, LevelHigh, "watcher's %s chan for relay log dir %s closed", "")
ErrWatcherChanRecvError = New(codeWatcherChanRecvError, ClassFunctional, ScopeInternal, LevelHigh, "watcher receives error, relay log dir %s", "")
ErrRelayLogFileSizeSmaller = New(codeRelayLogFileSizeSmaller, ClassFunctional, ScopeInternal, LevelHigh, "file size of relay log %s become smaller", "Please check the status of relay log and re-pull it. If you want to re-pull it, you should open relay.meta, set the binlog-name to the error pos name, set binlog-pos to 4, delete the stashed relay log and run `resume-relay` in dmctl.")
ErrBinlogFileNotSpecified = New(codeBinlogFileNotSpecified, ClassFunctional, ScopeInternal, LevelHigh, "binlog file must be specified", "")
ErrNoRelayLogMatchPos = New(codeNoRelayLogMatchPos, ClassFunctional, ScopeInternal, LevelHigh, "no relay log files in dir %s match pos %s", "")
ErrFirstRelayLogNotMatchPos = New(codeFirstRelayLogNotMatchPos, ClassFunctional, ScopeInternal, LevelHigh, "the first relay log %s not match the start pos %v", "")
ErrParserParseRelayLog = New(codeParserParseRelayLog, ClassFunctional, ScopeInternal, LevelHigh, "parse relay log file %s", "")
ErrNoSubdirToSwitch = New(codeNoSubdirToSwitch, ClassFunctional, ScopeInternal, LevelHigh, "parse for previous sub relay directory finished, but no next sub directory need to switch", "")
ErrNeedSyncAgain = New(codeNeedSyncAgain, ClassFunctional, ScopeInternal, LevelHigh, "Last sync error or closed, try sync and get event again", "")
ErrSyncClosed = New(codeSyncClosed, ClassFunctional, ScopeInternal, LevelHigh, "Sync was closed", "")
// pkg/utils.
ErrSchemaTableNameNotValid = New(codeSchemaTableNameNotValid, ClassFunctional, ScopeInternal, LevelHigh, "table name %s not valid", "")
ErrGenTableRouter = New(codeGenTableRouter, ClassFunctional, ScopeInternal, LevelHigh, "generate table router", "Please check `routes` config in task configuration file.")
ErrEncryptSecretKeyNotValid = New(codeEncryptSecretKeyNotValid, ClassFunctional, ScopeInternal, LevelHigh, "key size should be 16, 24 or 32, but input key's size is %d", "")
ErrEncryptGenCipher = New(codeEncryptGenCipher, ClassFunctional, ScopeInternal, LevelHigh, "generate cipher", "")
ErrEncryptGenIV = New(codeEncryptGenIV, ClassFunctional, ScopeInternal, LevelHigh, "generate iv", "")
ErrCiphertextLenNotValid = New(codeCiphertextLenNotValid, ClassFunctional, ScopeInternal, LevelHigh, "ciphertext's length should be greater than %d, but got %d not valid", "")
ErrCiphertextContextNotValid = New(codeCiphertextContextNotValid, ClassFunctional, ScopeInternal, LevelHigh, "ciphertext's content not valid", "")
ErrInvalidBinlogPosStr = New(codeInvalidBinlogPosStr, ClassFunctional, ScopeInternal, LevelHigh, "invalid mysql position string: %s", "")
ErrEncCipherTextBase64Decode = New(codeEncCipherTextBase64Decode, ClassFunctional, ScopeInternal, LevelHigh, "decode base64 encoded password %s", "")
// pkg/binlog.
ErrBinlogWriteBinaryData = New(codeBinlogWriteBinaryData, ClassFunctional, ScopeInternal, LevelHigh, "", "")
ErrBinlogWriteDataToBuffer = New(codeBinlogWriteDataToBuffer, ClassFunctional, ScopeInternal, LevelHigh, "", "")
ErrBinlogHeaderLengthNotValid = New(codeBinlogHeaderLengthNotValid, ClassFunctional, ScopeInternal, LevelHigh, "header length should be %d, but got %d not valid", "")
ErrBinlogEventDecode = New(codeBinlogEventDecode, ClassFunctional, ScopeInternal, LevelHigh, "decode % X", "")
ErrBinlogEmptyNextBinName = New(codeBinlogEmptyNextBinName, ClassFunctional, ScopeInternal, LevelHigh, "empty next binlog name not valid", "")
ErrBinlogParseSID = New(codeBinlogParseSID, ClassFunctional, ScopeInternal, LevelHigh, "", "")
ErrBinlogEmptyGTID = New(codeBinlogEmptyGTID, ClassFunctional, ScopeInternal, LevelHigh, "empty GTID set not valid", "")
ErrBinlogGTIDSetNotValid = New(codeBinlogGTIDSetNotValid, ClassFunctional, ScopeInternal, LevelHigh, "GTID set %s with flavor %s not valid", "")
ErrBinlogGTIDMySQLNotValid = New(codeBinlogGTIDMySQLNotValid, ClassFunctional, ScopeInternal, LevelHigh, "GTID set string %s for MySQL not valid", "")
ErrBinlogGTIDMariaDBNotValid = New(codeBinlogGTIDMariaDBNotValid, ClassFunctional, ScopeInternal, LevelHigh, "GTID set string %s for MariaDB not valid", "")
ErrBinlogMariaDBServerIDMismatch = New(codeBinlogMariaDBServerIDMismatch, ClassFunctional, ScopeInternal, LevelHigh, "server_id mismatch, in GTID (%d), in event header/server_id (%d)", "")
ErrBinlogOnlyOneGTIDSupport = New(codeBinlogOnlyOneGTIDSupport, ClassFunctional, ScopeInternal, LevelHigh, "only one GTID in set is supported, but got %d (%s)", "")
ErrBinlogOnlyOneIntervalInUUID = New(codeBinlogOnlyOneIntervalInUUID, ClassFunctional, ScopeInternal, LevelHigh, "only one Interval in UUIDSet is supported, but got %d (%s)", "")
ErrBinlogIntervalValueNotValid = New(codeBinlogIntervalValueNotValid, ClassFunctional, ScopeInternal, LevelHigh, "Interval's Stop should equal to Start+1, but got %+v (%s)", "")
ErrBinlogEmptyQuery = New(codeBinlogEmptyQuery, ClassFunctional, ScopeInternal, LevelHigh, "empty query not valid", "")
ErrBinlogTableMapEvNotValid = New(codeBinlogTableMapEvNotValid, ClassFunctional, ScopeInternal, LevelHigh, "empty schema (% X) or table (% X) or column type (% X)", "")
ErrBinlogExpectFormatDescEv = New(codeBinlogExpectFormatDescEv, ClassFunctional, ScopeInternal, LevelHigh, "expect FormatDescriptionEvent, but got %+v", "")
ErrBinlogExpectTableMapEv = New(codeBinlogExpectTableMapEv, ClassFunctional, ScopeInternal, LevelHigh, "expect TableMapEvent, but got %+v", "")
ErrBinlogExpectRowsEv = New(codeBinlogExpectRowsEv, ClassFunctional, ScopeInternal, LevelHigh, "expect event with type (%d), but got %+v", "")
ErrBinlogUnexpectedEv = New(codeBinlogUnexpectedEv, ClassFunctional, ScopeInternal, LevelHigh, "unexpected event %+v", "")
ErrBinlogParseSingleEv = New(codeBinlogParseSingleEv, ClassFunctional, ScopeInternal, LevelHigh, "", "")
ErrBinlogEventTypeNotValid = New(codeBinlogEventTypeNotValid, ClassFunctional, ScopeInternal, LevelHigh, "event type %d not valid", "")
ErrBinlogEventNoRows = New(codeBinlogEventNoRows, ClassFunctional, ScopeInternal, LevelHigh, "no rows not valid", "")
ErrBinlogEventNoColumns = New(codeBinlogEventNoColumns, ClassFunctional, ScopeInternal, LevelHigh, "no columns not valid", "")
ErrBinlogEventRowLengthNotEq = New(codeBinlogEventRowLengthNotEq, ClassFunctional, ScopeInternal, LevelHigh, "length of row (%d) not equal to length of column-type (%d)", "")
ErrBinlogColumnTypeNotSupport = New(codeBinlogColumnTypeNotSupport, ClassFunctional, ScopeInternal, LevelHigh, "column type %d in binlog not supported", "")
ErrBinlogGoMySQLTypeNotSupport = New(codeBinlogGoMySQLTypeNotSupport, ClassFunctional, ScopeInternal, LevelHigh, "go-mysql type %d in event generator not supported", "")
ErrBinlogColumnTypeMisMatch = New(codeBinlogColumnTypeMisMatch, ClassFunctional, ScopeInternal, LevelHigh, "value %+v (type %v) with column type %v not valid", "")
ErrBinlogDummyEvSizeTooSmall = New(codeBinlogDummyEvSizeTooSmall, ClassFunctional, ScopeInternal, LevelHigh, "required dummy event size (%d) is too small, the minimum supported size is %d", "")
ErrBinlogFlavorNotSupport = New(codeBinlogFlavorNotSupport, ClassFunctional, ScopeInternal, LevelHigh, "flavor %s not supported", "")
ErrBinlogDMLEmptyData = New(codeBinlogDMLEmptyData, ClassFunctional, ScopeInternal, LevelHigh, "empty data not valid", "")
ErrBinlogLatestGTIDNotInPrev = New(codeBinlogLatestGTIDNotInPrev, ClassFunctional, ScopeInternal, LevelHigh, "latest GTID %s is not one of the latest previousGTIDs %s not valid", "")
ErrBinlogReadFileByGTID = New(codeBinlogReadFileByGTID, ClassFunctional, ScopeInternal, LevelHigh, "read from file by GTID not supported", "")
ErrBinlogWriterNotStateNew = New(codeBinlogWriterNotStateNew, ClassFunctional, ScopeInternal, LevelHigh, "stage %s, expect %s, already started", "")
ErrBinlogWriterStateCannotClose = New(codeBinlogWriterStateCannotClose, ClassFunctional, ScopeInternal, LevelHigh, "stage %s, expect %s, can not close", "")
ErrBinlogWriterNeedStart = New(codeBinlogWriterNeedStart, ClassFunctional, ScopeInternal, LevelHigh, "stage %s, expect %s", "")
ErrBinlogWriterOpenFile = New(codeBinlogWriterOpenFile, ClassFunctional, ScopeInternal, LevelHigh, "open file", "")
ErrBinlogWriterGetFileStat = New(codeBinlogWriterGetFileStat, ClassFunctional, ScopeInternal, LevelHigh, "get stat for %s", "")
ErrBinlogWriterWriteDataLen = New(codeBinlogWriterWriteDataLen, ClassFunctional, ScopeInternal, LevelHigh, "data length %d", "")
ErrBinlogWriterFileNotOpened = New(codeBinlogWriterFileNotOpened, ClassFunctional, ScopeInternal, LevelHigh, "file %s not opened", "")
ErrBinlogWriterFileSync = New(codeBinlogWriterFileSync, ClassFunctional, ScopeInternal, LevelHigh, "sync file", "")
ErrBinlogPrevGTIDEvNotValid = New(codeBinlogPrevGTIDEvNotValid, ClassFunctional, ScopeInternal, LevelHigh, "the event should be a PreviousGTIDsEvent in go-mysql, but got %T", "")
ErrBinlogDecodeMySQLGTIDSet = New(codeBinlogDecodeMySQLGTIDSet, ClassFunctional, ScopeInternal, LevelHigh, "decode from % X", "")
ErrBinlogNeedMariaDBGTIDSet = New(codeBinlogNeedMariaDBGTIDSet, ClassFunctional, ScopeInternal, LevelHigh, "the event should be a MariadbGTIDListEvent, but got %T", "")
ErrBinlogParseMariaDBGTIDSet = New(codeBinlogParseMariaDBGTIDSet, ClassFunctional, ScopeInternal, LevelHigh, "parse MariaDB GTID set", "")
ErrBinlogMariaDBAddGTIDSet = New(codeBinlogMariaDBAddGTIDSet, ClassFunctional, ScopeInternal, LevelHigh, "add set %v to GTID set", "")
// pkg/tracing.
ErrTracingEventDataNotValid = New(codeTracingEventDataNotValid, ClassFunctional, ScopeInternal, LevelHigh, "invalid event data for type: %s", "")
ErrTracingUploadData = New(codeTracingUploadData, ClassFunctional, ScopeInternal, LevelHigh, "upload event", "")
ErrTracingEventTypeNotValid = New(codeTracingEventTypeNotValid, ClassFunctional, ScopeInternal, LevelHigh, "invalid event type %s, will not process", "")
ErrTracingGetTraceCode = New(codeTracingGetTraceCode, ClassFunctional, ScopeInternal, LevelHigh, "failed to get code information from runtime.Caller", "")
ErrTracingDataChecksum = New(codeTracingDataChecksum, ClassFunctional, ScopeInternal, LevelHigh, "calc data checksum", "")
ErrTracingGetTSO = New(codeTracingGetTSO, ClassFunctional, ScopeInternal, LevelHigh, "get tso", "")
// pkg/backoff.
ErrBackoffArgsNotValid = New(codeBackoffArgsNotValid, ClassFunctional, ScopeInternal, LevelMedium, "backoff argument %s value %v not valid", "")
// pkg.
ErrInitLoggerFail = New(codeInitLoggerFail, ClassFunctional, ScopeInternal, LevelMedium, "init logger failed", "")
// pkg/gtid.
ErrGTIDTruncateInvalid = New(codeGTIDTruncateInvalid, ClassFunctional, ScopeInternal, LevelHigh, "truncate GTID sets %v to %v not valid", "")
// pkg/streamer.
ErrRelayLogGivenPosTooBig = New(codeRelayLogGivenPosTooBig, ClassFunctional, ScopeInternal, LevelHigh, "the given relay log pos %s of meta config is too big, please check it again", "If the size of the corresponding binlog file has exceeded 4GB, please follow the solution in https://docs.pingcap.com/tidb-data-migration/stable/error-handling#the-relay-unit-throws-error-event-from--in--diff-from-passed-in-event--or-a-replication-task-is-interrupted-with-failing-to-get-or-parse-binlog-errors-like-get-binlog-error-error-1236-hy000-and-binlog-checksum-mismatch-data-may-be-corrupted-returned")
// pkg/election.
ErrElectionCampaignFail = New(codeElectionCampaignFail, ClassFunctional, ScopeInternal, LevelHigh, "fail to campaign leader: %s", "")
ErrElectionGetLeaderIDFail = New(codeElectionGetLeaderIDFail, ClassFunctional, ScopeInternal, LevelMedium, "fail to get leader ID", "")
// pkg/binlog.
ErrBinlogInvalidFilenameWithUUIDSuffix = New(codeBinlogInvalidFilenameWithUUIDSuffix, ClassFunctional, ScopeInternal, LevelHigh, "invalid binlog filename with uuid suffix %s", "")
// dm/common.
ErrDecodeEtcdKeyFail = New(codeDecodeEtcdKeyFail, ClassFunctional, ScopeInternal, LevelMedium, "fail to decode etcd key: %s", "")
// pkg/shardddl/optimism.
ErrShardDDLOptimismTrySyncFail = New(codeShardDDLOptimismTrySyncFail, ClassFunctional, ScopeInternal, LevelMedium, "fail to try sync the optimistic shard ddl lock %s: %s", "Please use `show-ddl-locks` command for more details.")
// pkg/conn.
ErrConnInvalidTLSConfig = New(codeConnInvalidTLSConfig, ClassFunctional, ScopeInternal, LevelMedium, "invalid TLS config", "Please check the `ssl-ca`, `ssl-cert` and `ssl-key` config.")
ErrConnRegistryTLSConfig = New(codeConnRegistryTLSConfig, ClassFunctional, ScopeInternal, LevelMedium, "fail to registry TLS config", "")
// pkg/upgrade.
ErrUpgradeVersionEtcdFail = New(codeUpgradeVersionEtcdFail, ClassFunctional, ScopeInternal, LevelHigh, "fail to operate DM cluster version in etcd", "Please use `list-member --master` to confirm whether the DM-master cluster is healthy")
// pkg/v1workermeta.
ErrInvalidV1WorkerMetaPath = New(codeInvalidV1WorkerMetaPath, ClassFunctional, ScopeInternal, LevelMedium, "%s is an invalid v1.0.x DM-worker meta path", "Please check no `meta-dir` set for v1.0.x DM-worker.")
// pkg/v1dbschema.
ErrFailUpdateV1DBSchema = New(codeFailUpdateV1DBSchema, ClassFunctional, ScopeInternal, LevelMedium, "fail to upgrade v1.0.x DB schema", "Please confirm that you have not violated any restrictions in the upgrade documentation.")
// pkg/binlog.
ErrBinlogStatusVarsParse = New(codeBinlogStatusVarsParse, ClassFunctional, ScopeInternal, LevelMedium, "fail to parse binglog status_vars: %v, offset: %d", "")
// Functional error.
ErrVerifyHandleErrorArgs = New(codeVerifyHandleErrorArgs, ClassFunctional, ScopeInternal, LevelLow, "", "Please make sure the args are correct.")
// pkg/parser.
ErrRewriteSQL = New(codeRewriteSQL, ClassFunctional, ScopeInternal, LevelHigh, "failed to rewrite SQL for target DB, stmt: %+v, targetTableNames: %+v", "")
// pkg/streamer.
ErrNoUUIDDirMatchGTID = New(codeNoUUIDDirMatchGTID, ClassFunctional, ScopeInternal, LevelHigh, "no relay subdir match gtid %s", "")
ErrNoRelayPosMatchGTID = New(codeNoRelayPosMatchGTID, ClassFunctional, ScopeInternal, LevelHigh, "no relay pos match gtid %s", "")
ErrReaderReachEndOfFile = New(codeReaderReachEndOfFile, ClassFunctional, ScopeInternal, LevelLow, "", "")
// pkg/dumplling.
ErrMetadataNoBinlogLoc = New(codeMetadataNoBinlogLoc, ClassFunctional, ScopeUpstream, LevelLow, "didn't found binlog location in dumped metadata file %s", "Please check log of dump unit, there maybe errors when read upstream binlog status")
ErrPreviousGTIDNotExist = New(codePreviousGTIDNotExist, ClassFunctional, ScopeInternal, LevelHigh, "no previous gtid event from binlog %s", "")
// Config related error.
ErrConfigCheckItemNotSupport = New(codeConfigCheckItemNotSupport, ClassConfig, ScopeInternal, LevelMedium, "checking item %s is not supported\n%s", "Please check `ignore-checking-items` config in task configuration file, which can be set including `all`/`dump_privilege`/`replication_privilege`/`version`/`binlog_enable`/`binlog_format`/`binlog_row_image`/`table_schema`/`schema_of_shard_tables`/`auto_increment_ID`.")
ErrConfigTomlTransform = New(codeConfigTomlTransform, ClassConfig, ScopeInternal, LevelMedium, "%s", "Please check the configuration file has correct TOML format.")
ErrConfigYamlTransform = New(codeConfigYamlTransform, ClassConfig, ScopeInternal, LevelMedium, "%s", "Please check the configuration file has correct YAML format.")
ErrConfigTaskNameEmpty = New(codeConfigTaskNameEmpty, ClassConfig, ScopeInternal, LevelMedium, "task name should not be empty", "Please check the `name` config in task configuration file.")
ErrConfigEmptySourceID = New(codeConfigEmptySourceID, ClassConfig, ScopeInternal, LevelMedium, "empty source-id not valid", "Please check the `source-id` config in configuration file.")
ErrConfigTooLongSourceID = New(codeConfigTooLongSourceID, ClassConfig, ScopeInternal, LevelMedium, "too long source-id not valid", "Please check the `source-id` config in configuration file. The max source id length is 32.")
ErrConfigOnlineSchemeNotSupport = New(codeConfigOnlineSchemeNotSupport, ClassConfig, ScopeInternal, LevelMedium, "online scheme %s not supported", "Please check the `online-ddl-scheme` config in task configuration file. Only `ghost` and `pt` are currently supported.")
ErrConfigInvalidTimezone = New(codeConfigInvalidTimezone, ClassConfig, ScopeInternal, LevelMedium, "invalid timezone string: %s", "Please check the `timezone` config in task configuration file.")
ErrConfigParseFlagSet = New(codeConfigParseFlagSet, ClassConfig, ScopeInternal, LevelMedium, "parse subtask config flag set", "")
ErrConfigDecryptDBPassword = New(codeConfigDecryptDBPassword, ClassConfig, ScopeInternal, LevelMedium, "decrypt DB password %s failed", "")
ErrConfigMetaInvalid = New(codeConfigMetaInvalid, ClassConfig, ScopeInternal, LevelMedium, "must specify `binlog-name` without GTID enabled for the source or specify `binlog-gtid` with GTID enabled for the source", "Please check the `meta` config in task configuration file.")
ErrConfigMySQLInstNotFound = New(codeConfigMySQLInstNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql instance config must specify", "Please check the `mysql-instances` config in task configuration file.")
ErrConfigMySQLInstsAtLeastOne = New(codeConfigMySQLInstsAtLeastOne, ClassConfig, ScopeInternal, LevelMedium, "must specify at least one mysql-instances", "Please check the `mysql-instances` config in task configuration file.")
ErrConfigMySQLInstSameSourceID = New(codeConfigMySQLInstSameSourceID, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance (%d) and (%d) have same source-id (%s)", "Please check the `mysql-instances` config in task configuration file.")
ErrConfigMydumperCfgConflict = New(codeConfigMydumperCfgConflict, ClassConfig, ScopeInternal, LevelMedium, "mydumper-config-name and mydumper should only specify one", "Please check the `mydumper-config-name` and `mydumper` config in task configuration file.")
ErrConfigLoaderCfgConflict = New(codeConfigLoaderCfgConflict, ClassConfig, ScopeInternal, LevelMedium, "loader-config-name and loader should only specify one", "Please check the `loader-config-name` and `loader` config in task configuration file.")
ErrConfigSyncerCfgConflict = New(codeConfigSyncerCfgConflict, ClassConfig, ScopeInternal, LevelMedium, "syncer-config-name and syncer should only specify one", "Please check the `syncer-config-name` and `syncer` config in task configuration file.")
ErrConfigReadCfgFromFile = New(codeConfigReadCfgFromFile, ClassConfig, ScopeInternal, LevelMedium, "read config file %v", "")
ErrConfigNeedUniqueTaskName = New(codeConfigNeedUniqueTaskName, ClassConfig, ScopeInternal, LevelMedium, "must specify a unique task name", "Please check the `name` config in task configuration file.")
ErrConfigInvalidTaskMode = New(codeConfigInvalidTaskMode, ClassConfig, ScopeInternal, LevelMedium, "please specify right task-mode, support `full`, `incremental`, `all`", "Please check the `task-mode` config in task configuration file.")
ErrConfigNeedTargetDB = New(codeConfigNeedTargetDB, ClassConfig, ScopeInternal, LevelMedium, "must specify target-database", "Please check the `target-database` config in task configuration file.")
ErrConfigMetadataNotSet = New(codeConfigMetadataNotSet, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d) must set meta for task-mode %s", "Please check the `meta` config in task configuration file.")
ErrConfigRouteRuleNotFound = New(codeConfigRouteRuleNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s route-rules %s not exist in routes", "Please check the `route-rules` config in task configuration file.")
ErrConfigFilterRuleNotFound = New(codeConfigFilterRuleNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s filter-rules %s not exist in filters", "Please check the `filter-rules` config in task configuration file.")
ErrConfigColumnMappingNotFound = New(codeConfigColumnMappingNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s column-mapping-rules %s not exist in column-mapping", "Please check the `column-mapping-rules` config in task configuration file.")
ErrConfigBAListNotFound = New(codeConfigBAListNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s list %s not exist in block allow list", "Please check the `block-allow-list` config in task configuration file.")
ErrConfigMydumperCfgNotFound = New(codeConfigMydumperCfgNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s mydumper config %s not exist in mydumpers", "Please check the `mydumper-config-name` config in task configuration file.")
ErrConfigMydumperPathNotValid = New(codeConfigMydumperPathNotValid, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s mydumper-path must specify a valid path to mydumper binary when task-mode is all or full", "Please check the `mydumper-path` config in task configuration file.")
ErrConfigLoaderCfgNotFound = New(codeConfigLoaderCfgNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s loader config %s not exist in loaders", "Please check the `loader-config-name` config in task configuration file.")
ErrConfigSyncerCfgNotFound = New(codeConfigSyncerCfgNotFound, ClassConfig, ScopeInternal, LevelMedium, "mysql-instance(%d)'s syncer config %s not exist in syncer", "Please check the `syncer-config-name` config in task configuration file.")
ErrConfigSourceIDNotFound = New(codeConfigSourceIDNotFound, ClassConfig, ScopeInternal, LevelMedium, "source %s in deployment configuration not found", "Please use `operate-source create source-config-file-path` to add source.")
ErrConfigDuplicateCfgItem = New(codeConfigDuplicateCfgItem, ClassConfig, ScopeInternal, LevelMedium, "the following mysql configs have duplicate items, please remove the duplicates:\n%s", "Please check the `mysql-instances` config in task configuration file.")
ErrConfigShardModeNotSupport = New(codeConfigShardModeNotSupport, ClassConfig, ScopeInternal, LevelMedium, "shard mode %s not supported", "Please check the `shard-mode` config in task configuration file, which can be set to `pessimistic`/`optimistic`.")
ErrConfigMoreThanOne = New(codeConfigMoreThanOne, ClassConfig, ScopeInternal, LevelHigh, "found %d %s for %s which should <= 1", "")
ErrConfigEtcdParse = New(codeConfigEtcdParse, ClassConfig, ScopeInternal, LevelHigh, "incapable config of %s from etcd", "")
ErrConfigMissingForBound = New(codeConfigMissingForBound, ClassConfig, ScopeInternal, LevelHigh, "source bound %s doesn't have related source config in etcd", "")
ErrConfigBinlogEventFilter = New(codeConfigBinlogEventFilter, ClassConfig, ScopeInternal, LevelHigh, "generate binlog event filter", "Please check the `filters` config in source and task configuration files.")
ErrConfigGlobalConfigsUnused = New(codeConfigGlobalConfigsUnused, ClassConfig, ScopeInternal, LevelHigh, "The configurations as following %v are set in global configuration but instances don't use them", "Please check the configuration files.")
// Binlog operation error.
ErrBinlogExtractPosition = New(codeBinlogExtractPosition, ClassBinlogOp, ScopeInternal, LevelHigh, "", "")
ErrBinlogInvalidFilename = New(codeBinlogInvalidFilename, ClassBinlogOp, ScopeInternal, LevelHigh, "invalid binlog filename", "")
ErrBinlogParsePosFromStr = New(codeBinlogParsePosFromStr, ClassBinlogOp, ScopeInternal, LevelHigh, "", "")
// Checkpoint error.
ErrCheckpointInvalidTaskMode = New(codeCheckpointInvalidTaskMode, ClassCheckpoint, ScopeInternal, LevelMedium, "invalid task mode: %s", "")
ErrCheckpointSaveInvalidPos = New(codeCheckpointSaveInvalidPos, ClassCheckpoint, ScopeInternal, LevelHigh, "save point %s is older than current location %s", "")
ErrCheckpointInvalidTableFile = New(codeCheckpointInvalidTableFile, ClassCheckpoint, ScopeInternal, LevelMedium, "invalid db table sql file - %s", "")
ErrCheckpointDBNotExistInFile = New(codeCheckpointDBNotExistInFile, ClassCheckpoint, ScopeInternal, LevelMedium, "db (%s) not exist in data files, but in checkpoint", "")
ErrCheckpointTableNotExistInFile = New(codeCheckpointTableNotExistInFile, ClassCheckpoint, ScopeInternal, LevelMedium, "table (%s) not exist in db (%s) data files, but in checkpoint", "")
ErrCheckpointRestoreCountGreater = New(codeCheckpointRestoreCountGreater, ClassCheckpoint, ScopeInternal, LevelMedium, "restoring count greater than total count for table[%v]", "")
// Task check error.
ErrTaskCheckSameTableName = New(codeTaskCheckSameTableName, ClassTaskCheck, ScopeInternal, LevelMedium, "same table name in case-insensitive %v", "Please check `target-table` config in task configuration file.")
ErrTaskCheckFailedOpenDB = New(codeTaskCheckFailedOpenDB, ClassTaskCheck, ScopeInternal, LevelHigh, "failed to open DSN %s:***@%s:%d", "Please check the database config in configuration file.")
ErrTaskCheckGenTableRouter = New(codeTaskCheckGenTableRouter, ClassTaskCheck, ScopeInternal, LevelMedium, "generate table router error", "Please check the `routes` config in task configuration file.")
ErrTaskCheckGenColumnMapping = New(codeTaskCheckGenColumnMapping, ClassTaskCheck, ScopeInternal, LevelMedium, "generate column mapping error", "Please check the `column-mappings` config in task configuration file.")
ErrTaskCheckSyncConfigError = New(codeTaskCheckSyncConfigError, ClassTaskCheck, ScopeInternal, LevelMedium, "%s: %v\n detail: %v", "")
ErrTaskCheckGenBAList = New(codeTaskCheckGenBAList, ClassTaskCheck, ScopeInternal, LevelMedium, "generate block allow list error", "Please check the `block-allow-list` config in task configuration file.")
ErrSourceCheckGTID = New(codeSourceCheckGTID, ClassTaskCheck, ScopeInternal, LevelMedium, "%s has GTID_MODE = %s instead of ON", "Please check the `enable-gtid` config in source configuration file.")
// Relay log basic API error.
ErrRelayParseUUIDIndex = New(codeRelayParseUUIDIndex, ClassRelayEventLib, ScopeInternal, LevelHigh, "parse server-uuid.index", "")
ErrRelayParseUUIDSuffix = New(codeRelayParseUUIDSuffix, ClassRelayEventLib, ScopeInternal, LevelHigh, "UUID (with suffix) %s not valid", "")
ErrRelayUUIDWithSuffixNotFound = New(codeRelayUUIDWithSuffixNotFound, ClassRelayEventLib, ScopeInternal, LevelHigh, "no UUID (with suffix) matched %s found in %s, all UUIDs are %v", "")
ErrRelayGenFakeRotateEvent = New(codeRelayGenFakeRotateEvent, ClassRelayEventLib, ScopeInternal, LevelHigh, "generate fake rotate event", "")
ErrRelayNoValidRelaySubDir = New(codeRelayNoValidRelaySubDir, ClassRelayEventLib, ScopeInternal, LevelHigh, "there aren't any data under relay log directory %s.", "Please check relay log using query-status.")
// Relay unit error.
ErrRelayUUIDSuffixNotValid = New(codeRelayUUIDSuffixNotValid, ClassRelayUnit, ScopeInternal, LevelHigh, "UUID %s suffix %d should be 1 larger than previous suffix %d", "")
ErrRelayUUIDSuffixLessThanPrev = New(codeRelayUUIDSuffixLessThanPrev, ClassRelayUnit, ScopeInternal, LevelHigh, "previous UUID %s has suffix larger than %s", "")
ErrRelayLoadMetaData = New(codeRelayLoadMetaData, ClassRelayUnit, ScopeInternal, LevelHigh, "load meta data", "")
ErrRelayBinlogNameNotValid = New(codeRelayBinlogNameNotValid, ClassRelayUnit, ScopeInternal, LevelHigh, "relay-binlog-name %s not valid", "Please check the `relay-binlog-name` config in source config file.")
ErrRelayNoCurrentUUID = New(codeRelayNoCurrentUUID, ClassRelayUnit, ScopeInternal, LevelHigh, "no current UUID set", "")
ErrRelayFlushLocalMeta = New(codeRelayFlushLocalMeta, ClassRelayUnit, ScopeInternal, LevelHigh, "flush local meta", "")
ErrRelayUpdateIndexFile = New(codeRelayUpdateIndexFile, ClassRelayUnit, ScopeInternal, LevelHigh, "update UUID index file %s", "")
ErrRelayLogDirpathEmpty = New(codeRelayLogDirpathEmpty, ClassRelayUnit, ScopeInternal, LevelHigh, "dirpath is empty", "Please check the `relay-dir` config in source config file.")
ErrRelayReaderNotStateNew = New(codeRelayReaderNotStateNew, ClassRelayUnit, ScopeInternal, LevelHigh, "stage %s, expect %s, already started", "")
ErrRelayReaderStateCannotClose = New(codeRelayReaderStateCannotClose, ClassRelayUnit, ScopeInternal, LevelHigh, "stage %s, expect %s, can not close", "")
ErrRelayReaderNeedStart = New(codeRelayReaderNeedStart, ClassRelayUnit, ScopeInternal, LevelHigh, "stage %s, expect %s", "")
ErrRelayTCPReaderStartSync = New(codeRelayTCPReaderStartSync, ClassRelayUnit, ScopeUpstream, LevelHigh, "start sync from position %s", "")
ErrRelayTCPReaderNilGTID = New(codeRelayTCPReaderNilGTID, ClassRelayUnit, ScopeInternal, LevelHigh, "nil GTID set not valid", "")
ErrRelayTCPReaderStartSyncGTID = New(codeRelayTCPReaderStartSyncGTID, ClassRelayUnit, ScopeUpstream, LevelHigh, "start sync from GTID set %s", "")
ErrRelayTCPReaderGetEvent = New(codeRelayTCPReaderGetEvent, ClassRelayUnit, ScopeUpstream, LevelHigh, "TCPReader get relay event with error", "")
ErrRelayWriterNotStateNew = New(codeRelayWriterNotStateNew, ClassRelayUnit, ScopeInternal, LevelHigh, "stage %s, expect %s, already started", "")
ErrRelayWriterStateCannotClose = New(codeRelayWriterStateCannotClose, ClassRelayUnit, ScopeInternal, LevelHigh, "stage %s, expect %s, can not close", "")
ErrRelayWriterNeedStart = New(codeRelayWriterNeedStart, ClassRelayUnit, ScopeInternal, LevelHigh, "stage %s, expect %s", "")
ErrRelayWriterNotOpened = New(codeRelayWriterNotOpened, ClassRelayUnit, ScopeInternal, LevelHigh, "no underlying writer opened", "")
ErrRelayWriterExpectRotateEv = New(codeRelayWriterExpectRotateEv, ClassRelayUnit, ScopeInternal, LevelHigh, "except RotateEvent, but got %+v", "")
ErrRelayWriterRotateEvWithNoWriter = New(codeRelayWriterRotateEvWithNoWriter, ClassRelayUnit, ScopeInternal, LevelHigh, "non-fake RotateEvent %+v received, but no binlog file opened", "")
ErrRelayWriterStatusNotValid = New(codeRelayWriterStatusNotValid, ClassRelayUnit, ScopeInternal, LevelHigh, "invalid status type %T of the underlying writer", "")
ErrRelayWriterGetFileStat = New(codeRelayWriterGetFileStat, ClassRelayUnit, ScopeInternal, LevelHigh, "get stat for %s", "")
ErrRelayWriterLatestPosGTFileSize = New(codeRelayWriterLatestPosGTFileSize, ClassRelayUnit, ScopeInternal, LevelHigh, "latest pos %d greater than file size %d, should not happen", "")
ErrRelayWriterFileOperate = New(codeRelayWriterFileOperate, ClassRelayUnit, ScopeInternal, LevelHigh, "", "")
ErrRelayCheckBinlogFileHeaderExist = New(codeRelayCheckBinlogFileHeaderExist, ClassRelayUnit, ScopeInternal, LevelHigh, "", "")
ErrRelayCheckFormatDescEventExist = New(codeRelayCheckFormatDescEventExist, ClassRelayUnit, ScopeInternal, LevelHigh, "", "")
ErrRelayCheckFormatDescEventParseEv = New(codeRelayCheckFormatDescEventParseEv, ClassRelayUnit, ScopeInternal, LevelHigh, "parse %s", "")
ErrRelayCheckIsDuplicateEvent = New(codeRelayCheckIsDuplicateEvent, ClassRelayUnit, ScopeInternal, LevelHigh, "", "")
ErrRelayUpdateGTID = New(codeRelayUpdateGTID, ClassRelayUnit, ScopeInternal, LevelHigh, "update GTID set %v with GTID %s", "")
ErrRelayNeedPrevGTIDEvBeforeGTIDEv = New(codeRelayNeedPrevGTIDEvBeforeGTIDEv, ClassRelayUnit, ScopeInternal, LevelHigh, "should have a PreviousGTIDsEvent before the GTIDEvent %+v", "")
ErrRelayNeedMaGTIDListEvBeforeGTIDEv = New(codeRelayNeedMaGTIDListEvBeforeGTIDEv, ClassRelayUnit, ScopeInternal, LevelHigh, "should have a MariadbGTIDListEvent before the MariadbGTIDEvent %+v", "")
ErrRelayMkdir = New(codeRelayMkdir, ClassRelayUnit, ScopeInternal, LevelHigh, "relay mkdir", "")
ErrRelaySwitchMasterNeedGTID = New(codeRelaySwitchMasterNeedGTID, ClassRelayUnit, ScopeInternal, LevelHigh, "can only switch relay's master server when GTID enabled", "Please check `enable-gtid` config in source configuration file.")
ErrRelayThisStrategyIsPurging = New(codeRelayThisStrategyIsPurging, ClassRelayUnit, ScopeInternal, LevelHigh, "this strategy is purging", "")
ErrRelayOtherStrategyIsPurging = New(codeRelayOtherStrategyIsPurging, ClassRelayUnit, ScopeInternal, LevelHigh, "%s is purging", "")
ErrRelayPurgeIsForbidden = New(codeRelayPurgeIsForbidden, ClassRelayUnit, ScopeInternal, LevelHigh, "relay log purge is forbidden temporarily, because %s", "Please try again later.")
ErrRelayNoActiveRelayLog = New(codeRelayNoActiveRelayLog, ClassRelayUnit, ScopeInternal, LevelHigh, "no active relay log file found", "")
ErrRelayPurgeRequestNotValid = New(codeRelayPurgeRequestNotValid, ClassRelayUnit, ScopeInternal, LevelHigh, "request %+v not valid", "")
ErrRelayTrimUUIDNotFound = New(codeRelayTrimUUIDNotFound, ClassRelayUnit, ScopeInternal, LevelHigh, "UUID %s in UUIDs %v not found", "")
ErrRelayRemoveFileFail = New(codeRelayRemoveFileFail, ClassRelayUnit, ScopeInternal, LevelHigh, "remove relay log %s %s", "")
ErrRelayPurgeArgsNotValid = New(codeRelayPurgeArgsNotValid, ClassRelayUnit, ScopeInternal, LevelHigh, "args (%T) %+v not valid", "")
ErrPreviousGTIDsNotValid = New(codePreviousGTIDsNotValid, ClassRelayUnit, ScopeInternal, LevelHigh, "previousGTIDs %s not valid", "")
ErrRotateEventWithDifferentServerID = New(codeRotateEventWithDifferentServerID, ClassRelayUnit, ScopeInternal, LevelHigh, "receive fake rotate event with different server_id", "Please use `resume-relay` command if upstream database has changed")
// Dump unit error.
ErrDumpUnitRuntime = New(codeDumpUnitRuntime, ClassDumpUnit, ScopeInternal, LevelHigh, "mydumper/dumpling runs with error, with output (may empty): %s", "")
ErrDumpUnitGenTableRouter = New(codeDumpUnitGenTableRouter, ClassDumpUnit, ScopeInternal, LevelHigh, "generate table router", "Please check `routes` config in task configuration file.")
ErrDumpUnitGenBAList = New(codeDumpUnitGenBAList, ClassDumpUnit, ScopeInternal, LevelHigh, "generate block allow list", "Please check the `block-allow-list` config in task configuration file.")
ErrDumpUnitGlobalLock = New(codeDumpUnitGlobalLock, ClassDumpUnit, ScopeInternal, LevelHigh, "Couldn't acquire global lock", "Please check upstream privilege about FTWRL, or add `--no-locks` or `--consistency none` to extra-args of mydumpers")
// Load unit error.
ErrLoadUnitCreateSchemaFile = New(codeLoadUnitCreateSchemaFile, ClassLoadUnit, ScopeInternal, LevelMedium, "generate schema file", "Please check the `loaders` config in task configuration file.")
ErrLoadUnitInvalidFileEnding = New(codeLoadUnitInvalidFileEnding, ClassLoadUnit, ScopeInternal, LevelHigh, "corresponding ending of sql: ')' not found", "")
ErrLoadUnitParseQuoteValues = New(codeLoadUnitParseQuoteValues, ClassLoadUnit, ScopeInternal, LevelHigh, "parse quote values error", "")
ErrLoadUnitDoColumnMapping = New(codeLoadUnitDoColumnMapping, ClassLoadUnit, ScopeInternal, LevelHigh, "mapping row data %v for table %+v", "")
ErrLoadUnitReadSchemaFile = New(codeLoadUnitReadSchemaFile, ClassLoadUnit, ScopeInternal, LevelHigh, "read schema from sql file %s", "")
ErrLoadUnitParseStatement = New(codeLoadUnitParseStatement, ClassLoadUnit, ScopeInternal, LevelHigh, "parse statement %s", "")
ErrLoadUnitNotCreateTable = New(codeLoadUnitNotCreateTable, ClassLoadUnit, ScopeInternal, LevelHigh, "statement %s for %s/%s is not create table statement", "")
ErrLoadUnitDispatchSQLFromFile = New(codeLoadUnitDispatchSQLFromFile, ClassLoadUnit, ScopeInternal, LevelHigh, "dispatch sql", "")
ErrLoadUnitInvalidInsertSQL = New(codeLoadUnitInvalidInsertSQL, ClassLoadUnit, ScopeInternal, LevelHigh, "invalid insert sql %s", "")
ErrLoadUnitGenTableRouter = New(codeLoadUnitGenTableRouter, ClassLoadUnit, ScopeInternal, LevelHigh, "generate table router", "Please check `routes` config in task configuration file.")
ErrLoadUnitGenColumnMapping = New(codeLoadUnitGenColumnMapping, ClassLoadUnit, ScopeInternal, LevelHigh, "generate column mapping", "Please check the `column-mapping-rules` config in task configuration file.")
ErrLoadUnitNoDBFile = New(codeLoadUnitNoDBFile, ClassLoadUnit, ScopeInternal, LevelHigh, "invalid data sql file, cannot find db - %s", "")
ErrLoadUnitNoTableFile = New(codeLoadUnitNoTableFile, ClassLoadUnit, ScopeInternal, LevelHigh, "invalid data sql file, cannot find table - %s", "")
ErrLoadUnitDumpDirNotFound = New(codeLoadUnitDumpDirNotFound, ClassLoadUnit, ScopeInternal, LevelHigh, "%s does not exist or it's not a dir", "")
ErrLoadUnitDuplicateTableFile = New(codeLoadUnitDuplicateTableFile, ClassLoadUnit, ScopeInternal, LevelHigh, "invalid table schema file, duplicated item - %s", "")
ErrLoadUnitGenBAList = New(codeLoadUnitGenBAList, ClassLoadUnit, ScopeInternal, LevelHigh, "generate block allow list", "Please check the `block-allow-list` config in task configuration file.")
// Sync unit error.
ErrSyncerUnitPanic = New(codeSyncerUnitPanic, ClassSyncUnit, ScopeInternal, LevelHigh, "panic error: %v", "")
ErrSyncUnitInvalidTableName = New(codeSyncUnitInvalidTableName, ClassSyncUnit, ScopeInternal, LevelHigh, "extract table name for DML error: %s", "")
ErrSyncUnitTableNameQuery = New(codeSyncUnitTableNameQuery, ClassSyncUnit, ScopeInternal, LevelHigh, "table name parse error: %s", "")
ErrSyncUnitNotSupportedDML = New(codeSyncUnitNotSupportedDML, ClassSyncUnit, ScopeInternal, LevelHigh, "DMLNode %v not supported", "")
ErrSyncUnitAddTableInSharding = New(codeSyncUnitAddTableInSharding, ClassSyncUnit, ScopeInternal, LevelMedium, "in sequence sharding, add table, activeDDL: %s, sharding sequence: %s not supported", "")
ErrSyncUnitDropSchemaTableInSharding = New(codeSyncUnitDropSchemaTableInSharding, ClassSyncUnit, ScopeInternal, LevelMedium, "in sequence sharding try drop sources %v not supported, activeDDL: %s, sharding sequence: %s", "")
ErrSyncUnitInvalidShardMeta = New(codeSyncUnitInvalidShardMeta, ClassSyncUnit, ScopeInternal, LevelHigh, "invalid sharding meta data", "")
ErrSyncUnitDDLWrongSequence = New(codeSyncUnitDDLWrongSequence, ClassSyncUnit, ScopeInternal, LevelHigh, "detect inconsistent DDL sequence from source %+v, right DDL sequence should be %+v", "Please use `show-ddl-locks` command for more details.")
ErrSyncUnitDDLActiveIndexLarger = New(codeSyncUnitDDLActiveIndexLarger, ClassSyncUnit, ScopeInternal, LevelHigh, "activeIdx %d larger than length of global DDLItems: %v", "")
ErrSyncUnitDupTableGroup = New(codeSyncUnitDupTableGroup, ClassSyncUnit, ScopeInternal, LevelHigh, "table group %s exists", "")
ErrSyncUnitShardingGroupNotFound = New(codeSyncUnitShardingGroupNotFound, ClassSyncUnit, ScopeInternal, LevelHigh, "sharding group for `%s`.`%s` not found", "")
ErrSyncUnitSafeModeSetCount = New(codeSyncUnitSafeModeSetCount, ClassSyncUnit, ScopeInternal, LevelHigh, "", "")
ErrSyncUnitCausalityConflict = New(codeSyncUnitCausalityConflict, ClassSyncUnit, ScopeInternal, LevelHigh, "some conflicts in causality, must be resolved", "")
// ErrSyncUnitDMLStatementFound defines an error which means we found unexpected dml statement found in query event.
ErrSyncUnitDMLStatementFound = New(codeSyncUnitDMLStatementFound, ClassSyncUnit, ScopeInternal, LevelHigh, "only support ROW format binlog, unexpected DML statement found in query event", "")
ErrSyncerUnitBinlogEventFilter = New(codeSyncerUnitBinlogEventFilter, ClassSyncUnit, ScopeInternal, LevelHigh, "", "")
ErrSyncerUnitInvalidReplicaEvent = New(codeSyncerUnitInvalidReplicaEvent, ClassSyncUnit, ScopeInternal, LevelHigh, "invalid replication event type %v", "")
ErrSyncerUnitParseStmt = New(codeSyncerUnitParseStmt, ClassSyncUnit, ScopeInternal, LevelHigh, "", "")
ErrSyncerUnitUUIDNotLatest = New(codeSyncerUnitUUIDNotLatest, ClassSyncUnit, ScopeInternal, LevelHigh, "UUID %s not the latest one in UUIDs %v", "")
ErrSyncerUnitDDLExecChanCloseOrBusy = New(codeSyncerUnitDDLExecChanCloseOrBusy, ClassSyncUnit, ScopeInternal, LevelHigh, "the chan has closed or already in sending", "")
ErrSyncerUnitDDLChanDone = New(codeSyncerUnitDDLChanDone, ClassSyncUnit, ScopeInternal, LevelHigh, "canceled from external", "")
ErrSyncerUnitDDLChanCanceled = New(codeSyncerUnitDDLChanCanceled, ClassSyncUnit, ScopeInternal, LevelHigh, "canceled by Close or Renew", "")
ErrSyncerUnitDDLOnMultipleTable = New(codeSyncerUnitDDLOnMultipleTable, ClassSyncUnit, ScopeInternal, LevelHigh, "ddl on multiple table: %s not supported", "It is recommended to include only one DDL operation in a statement executed upstream. Please manually handle it using dmctl (skipping the DDL statement or replacing the DDL statement with a specified DDL statement). For details, see https://docs.pingcap.com/tidb-data-migration/stable/handle-failed-sql-statements")
ErrSyncerUnitInjectDDLOnly = New(codeSyncerUnitInjectDDLOnly, ClassSyncUnit, ScopeInternal, LevelLow, "only support inject DDL for sharding group to be synced currently, but got %s", "")
ErrSyncerUnitInjectDDLWithoutSchema = New(codeSyncerUnitInjectDDLWithoutSchema, ClassSyncUnit, ScopeInternal, LevelLow, "injected DDL %s without schema name not valid", "")
ErrSyncerUnitNotSupportedOperate = New(codeSyncerUnitNotSupportedOperate, ClassSyncUnit, ScopeInternal, LevelMedium, "op %s not supported", "")
ErrSyncerUnitNilOperatorReq = New(codeSyncerUnitNilOperatorReq, ClassSyncUnit, ScopeInternal, LevelMedium, "nil request not valid", "")
ErrSyncerUnitDMLColumnNotMatch = New(codeSyncerUnitDMLColumnNotMatch, ClassSyncUnit, ScopeInternal, LevelHigh, "Column count doesn't match value count: %d (columns) vs %d (values)", "")
ErrSyncerUnitDMLOldNewValueMismatch = New(codeSyncerUnitDMLOldNewValueMismatch, ClassSyncUnit, ScopeInternal, LevelHigh, "Old value count doesn't match new value count: %d (old) vs %d (new)", "")
ErrSyncerUnitDMLPruneColumnMismatch = New(codeSyncerUnitDMLPruneColumnMismatch, ClassSyncUnit, ScopeInternal, LevelHigh, "prune DML columns and data mismatch in length: %d (columns) %d (data)", "")
ErrSyncerUnitGenBinlogEventFilter = New(codeSyncerUnitGenBinlogEventFilter, ClassSyncUnit, ScopeInternal, LevelHigh, "generate binlog event filter", "Pleass check the `filters` config in source and task configuration files.")
ErrSyncerUnitGenTableRouter = New(codeSyncerUnitGenTableRouter, ClassSyncUnit, ScopeInternal, LevelHigh, "generate table router", "Please check `routes` config in task configuration file.")
ErrSyncerUnitGenColumnMapping = New(codeSyncerUnitGenColumnMapping, ClassSyncUnit, ScopeInternal, LevelHigh, "generate column mapping", "Please check the `column-mappings` config in task configuration file.")
ErrSyncerUnitDoColumnMapping = New(codeSyncerUnitDoColumnMapping, ClassSyncUnit, ScopeInternal, LevelHigh, "mapping row data %v for table `%s`.`%s`", "")
ErrSyncerUnitCacheKeyNotFound = New(codeSyncerUnitCacheKeyNotFound, ClassSyncUnit, ScopeInternal, LevelHigh, "cache key %s in %s not found", "")
ErrSyncerUnitHeartbeatCheckConfig = New(codeSyncerUnitHeartbeatCheckConfig, ClassSyncUnit, ScopeInternal, LevelMedium, "", "Please check `heartbeat` config in task configuration file.")
ErrSyncerUnitHeartbeatRecordExists = New(codeSyncerUnitHeartbeatRecordExists, ClassSyncUnit, ScopeInternal, LevelMedium, "heartbeat slave record for task %s already exists", "")
ErrSyncerUnitHeartbeatRecordNotFound = New(codeSyncerUnitHeartbeatRecordNotFound, ClassSyncUnit, ScopeInternal, LevelMedium, "heartbeat slave record for task %s not found", "")
ErrSyncerUnitHeartbeatRecordNotValid = New(codeSyncerUnitHeartbeatRecordNotValid, ClassSyncUnit, ScopeInternal, LevelMedium, "heartbeat record %s not valid", "")
ErrSyncerUnitOnlineDDLInvalidMeta = New(codeSyncerUnitOnlineDDLInvalidMeta, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl meta invalid", "")
ErrSyncerUnitOnlineDDLSchemeNotSupport = New(codeSyncerUnitOnlineDDLSchemeNotSupport, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl scheme (%s) not supported", "Please check the `online-ddl-scheme` config in task configuration file. Only `ghost` and `pt` are currently supported.")
ErrSyncerUnitOnlineDDLOnMultipleTable = New(codeSyncerUnitOnlineDDLOnMultipleTable, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl changes on multiple table: %s not supported", "")
ErrSyncerUnitGhostApplyEmptyTable = New(codeSyncerUnitGhostApplyEmptyTable, ClassSyncUnit, ScopeInternal, LevelHigh, "empty tables not valid", "")
ErrSyncerUnitGhostRenameTableNotValid = New(codeSyncerUnitGhostRenameTableNotValid, ClassSyncUnit, ScopeInternal, LevelHigh, "tables should contain old and new table name", "")
ErrSyncerUnitGhostRenameToGhostTable = New(codeSyncerUnitGhostRenameToGhostTable, ClassSyncUnit, ScopeInternal, LevelHigh, "rename table to gh-ost temporary table %s not supported", "")
ErrSyncerUnitGhostRenameGhostTblToOther = New(codeSyncerUnitGhostRenameGhostTblToOther, ClassSyncUnit, ScopeInternal, LevelHigh, "rename gh-ost temporary table to other temporary table %s not supported", "")
ErrSyncerUnitGhostOnlineDDLOnGhostTbl = New(codeSyncerUnitGhostOnlineDDLOnGhostTbl, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl metadata for ghost temporary table `%s`.`%s` not found", "")
ErrSyncerUnitPTApplyEmptyTable = New(codeSyncerUnitPTApplyEmptyTable, ClassSyncUnit, ScopeInternal, LevelHigh, "empty tables not valid", "")
ErrSyncerUnitPTRenameTableNotValid = New(codeSyncerUnitPTRenameTableNotValid, ClassSyncUnit, ScopeInternal, LevelHigh, "tables should contain old and new table name", "")
ErrSyncerUnitPTRenameToPTTable = New(codeSyncerUnitPTRenameToPTTable, ClassSyncUnit, ScopeInternal, LevelHigh, "rename table to pt temporary table %s not supported", "")
ErrSyncerUnitPTRenamePTTblToOther = New(codeSyncerUnitPTRenamePTTblToOther, ClassSyncUnit, ScopeInternal, LevelHigh, "rename pt temporary table to other temporary table %s not supported", "")
ErrSyncerUnitPTOnlineDDLOnPTTbl = New(codeSyncerUnitPTOnlineDDLOnPTTbl, ClassSyncUnit, ScopeInternal, LevelHigh, "online ddl metadata for pt temporary table `%s`.`%s` not found", "This error may caused when the online DDL is filtered by binlog event filter, if so, please use `handle-error skip` sometimes to skip related DDLs.")
ErrSyncerUnitRemoteSteamerWithGTID = New(codeSyncerUnitRemoteSteamerWithGTID, ClassSyncUnit, ScopeInternal, LevelHigh, "open remote streamer with GTID mode not supported", "")
ErrSyncerUnitRemoteSteamerStartSync = New(codeSyncerUnitRemoteSteamerStartSync, ClassSyncUnit, ScopeInternal, LevelHigh, "start syncing binlog from remote streamer", "")
ErrSyncerUnitGetTableFromDB = New(codeSyncerUnitGetTableFromDB, ClassSyncUnit, ScopeInternal, LevelHigh, "invalid table `%s`.`%s`", "")
ErrSyncerUnitFirstEndPosNotFound = New(codeSyncerUnitFirstEndPosNotFound, ClassSyncUnit, ScopeInternal, LevelHigh, "no valid End_log_pos of the first DDL exists for sharding group with source %s", "")
ErrSyncerUnitResolveCasualityFail = New(codeSyncerUnitResolveCasualityFail, ClassSyncUnit, ScopeInternal, LevelHigh, "resolve karam error %v", "")
ErrSyncerUnitReopenStreamNotSupport = New(codeSyncerUnitReopenStreamNotSupport, ClassSyncUnit, ScopeInternal, LevelHigh, "reopen %T not supported", "")
ErrSyncerUnitUpdateConfigInSharding = New(codeSyncerUnitUpdateConfigInSharding, ClassSyncUnit, ScopeInternal, LevelHigh, "try update config when some tables' (%v) sharding DDL not synced not supported", "Please try again later.")
ErrSyncerUnitExecWithNoBlockingDDL = New(codeSyncerUnitExecWithNoBlockingDDL, ClassSyncUnit, ScopeInternal, LevelHigh, "process unit not waiting for sharding DDL to sync", "")
ErrSyncerUnitGenBAList = New(codeSyncerUnitGenBAList, ClassSyncUnit, ScopeInternal, LevelHigh, "generate block allow list", "Please check the `block-allow-list` config in task configuration file.")
ErrSyncerUnitHandleDDLFailed = New(codeSyncerUnitHandleDDLFailed, ClassSyncUnit, ScopeInternal, LevelHigh, "fail to handle ddl job for %s", "")