You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

error_code.go 4.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. package errors
  18. type TransactionErrorCode int32
  19. const (
  20. // TransactionErrorCodeUnknown Unknown transaction errors code.
  21. TransactionErrorCodeUnknown = TransactionErrorCode(0)
  22. // TransactionErrorCodeBeginFailed BeginFailed
  23. TransactionErrorCodeBeginFailed = TransactionErrorCode(1)
  24. // TransactionErrorCodeLockKeyConflict Lock key conflict transaction errors code.
  25. TransactionErrorCodeLockKeyConflict = TransactionErrorCode(2)
  26. // Io transaction errors code.
  27. IO = TransactionErrorCode(3)
  28. // TransactionErrorCodeBranchRollbackFailedRetriable Branch rollback failed retriable transaction errors code.
  29. TransactionErrorCodeBranchRollbackFailedRetriable = TransactionErrorCode(4)
  30. // TransactionErrorCodeBranchRollbackFailedUnretriable Branch rollback failed unretriable transaction errors code.
  31. TransactionErrorCodeBranchRollbackFailedUnretriable = TransactionErrorCode(5)
  32. // TransactionErrorCodeBranchRegisterFailed Branch register failed transaction errors code.
  33. TransactionErrorCodeBranchRegisterFailed = TransactionErrorCode(6)
  34. // TransactionErrorCodeBranchReportFailed Branch report failed transaction errors code.
  35. TransactionErrorCodeBranchReportFailed = TransactionErrorCode(7)
  36. // TransactionErrorCodeLockableCheckFailed Lockable check failed transaction errors code.
  37. TransactionErrorCodeLockableCheckFailed = TransactionErrorCode(8)
  38. // TransactionErrorCodeBranchTransactionNotExist Branch transaction not exist transaction errors code.
  39. TransactionErrorCodeBranchTransactionNotExist = TransactionErrorCode(9)
  40. // TransactionErrorCodeGlobalTransactionNotExist Global transaction not exist transaction errors code.
  41. TransactionErrorCodeGlobalTransactionNotExist = TransactionErrorCode(10)
  42. // TransactionErrorCodeGlobalTransactionNotActive Global transaction not active transaction errors code.
  43. TransactionErrorCodeGlobalTransactionNotActive = TransactionErrorCode(11)
  44. // TransactionErrorCodeGlobalTransactionStatusInvalid Global transaction status invalid transaction errors code.
  45. TransactionErrorCodeGlobalTransactionStatusInvalid = TransactionErrorCode(12)
  46. // TransactionErrorCodeFailedToSendBranchCommitRequest Failed to send branch commit request transaction errors code.
  47. TransactionErrorCodeFailedToSendBranchCommitRequest = TransactionErrorCode(13)
  48. // TransactionErrorCodeFailedToSendBranchRollbackRequest Failed to send branch rollback request transaction errors code.
  49. TransactionErrorCodeFailedToSendBranchRollbackRequest = TransactionErrorCode(14)
  50. // TransactionErrorCodeFailedToAddBranch Failed to add branch transaction errors code.
  51. TransactionErrorCodeFailedToAddBranch = TransactionErrorCode(15)
  52. // TransactionErrorCodeFailedLockGlobalTranscation Failed to lock global transaction errors code.
  53. TransactionErrorCodeFailedLockGlobalTranscation = TransactionErrorCode(16)
  54. // TransactionErrorCodeFailedWriteSession FailedWriteSession
  55. TransactionErrorCodeFailedWriteSession = TransactionErrorCode(17)
  56. // FailedStore Failed to holder errors code
  57. FailedStore = TransactionErrorCode(18)
  58. // LockKeyConflictFailFast Lock key conflict fail fast transaction exception code.
  59. LockKeyConflictFailFast = TransactionErrorCode(19)
  60. // TccFenceDbDuplicateKeyError Insert tcc fence record duplicate key errors
  61. TccFenceDbDuplicateKeyError = TransactionErrorCode(20)
  62. // RollbackFenceError rollback tcc fence error
  63. RollbackFenceError = TransactionErrorCode(21)
  64. // CommitFenceError commit tcc fence error
  65. CommitFenceError = TransactionErrorCode(22)
  66. // TccFenceDbError query tcc fence prepare sql failed
  67. TccFenceDbError = TransactionErrorCode(23)
  68. // PrepareFenceError prepare tcc fence error
  69. PrepareFenceError = TransactionErrorCode(24)
  70. // FenceBusinessError callback business method maybe return this error type
  71. FenceBusinessError = TransactionErrorCode(26)
  72. // FencePhaseError have fence phase but is not illegal value
  73. FencePhaseError = TransactionErrorCode(27)
  74. )