@@ -19,7 +19,6 @@ use databend_common_meta_types::MatchSeq;
1919
2020use crate :: data_mask:: data_mask_name_ident;
2121use crate :: principal:: procedure_name_ident;
22- use crate :: principal:: AutoIncrementKey ;
2322use crate :: principal:: ProcedureIdentity ;
2423use crate :: row_access_policy:: row_access_policy_name_ident;
2524use crate :: schema:: catalog_name_ident;
@@ -968,22 +967,6 @@ impl UnsupportedSequenceStorageVersion {
968967 }
969968}
970969
971- #[ derive( thiserror:: Error , Debug , Clone , PartialEq , Eq ) ]
972- #[ error( "OutOfAutoIncrementRange: `{key}` while `{context}`" ) ]
973- pub struct OutOfAutoIncrementRange {
974- key : AutoIncrementKey ,
975- context : String ,
976- }
977-
978- impl OutOfAutoIncrementRange {
979- pub fn new ( key : AutoIncrementKey , context : impl ToString ) -> Self {
980- Self {
981- key,
982- context : context. to_string ( ) ,
983- }
984- }
985- }
986-
987970/// Application error.
988971///
989972/// The application does not get expected result but there is nothing wrong with meta-service.
@@ -1165,9 +1148,6 @@ pub enum AppError {
11651148 #[ error( transparent) ]
11661149 SequenceError ( #[ from] SequenceError ) ,
11671150
1168- #[ error( transparent) ]
1169- AutoIncrementError ( #[ from] AutoIncrementError ) ,
1170-
11711151 #[ error( transparent) ]
11721152 UpdateStreamMetasFailed ( #[ from] UpdateStreamMetasFailed ) ,
11731153
@@ -1236,12 +1216,6 @@ pub enum SequenceError {
12361216 UnsupportedSequenceStorageVersion ( #[ from] UnsupportedSequenceStorageVersion ) ,
12371217}
12381218
1239- #[ derive( thiserror:: Error , Debug , Clone , PartialEq , Eq ) ]
1240- pub enum AutoIncrementError {
1241- #[ error( transparent) ]
1242- OutOfAutoIncrementRange ( #[ from] OutOfAutoIncrementRange ) ,
1243- }
1244-
12451219impl AppErrorMessage for TenantIsEmpty {
12461220 fn message ( & self ) -> String {
12471221 self . to_string ( )
@@ -1594,22 +1568,6 @@ impl AppErrorMessage for SequenceError {
15941568 }
15951569}
15961570
1597- impl AppErrorMessage for OutOfAutoIncrementRange {
1598- fn message ( & self ) -> String {
1599- format ! ( "AutoIncrement '{}' out of range" , self . key)
1600- }
1601- }
1602-
1603- impl AppErrorMessage for AutoIncrementError {
1604- fn message ( & self ) -> String {
1605- match self {
1606- AutoIncrementError :: OutOfAutoIncrementRange ( e) => {
1607- format ! ( "OutOfAutoIncrementRange: '{}'" , e. message( ) )
1608- }
1609- }
1610- }
1611- }
1612-
16131571impl AppErrorMessage for VirtualColumnIdOutBound { }
16141572
16151573impl AppErrorMessage for VirtualColumnTooMany { }
@@ -1737,7 +1695,6 @@ impl From<AppError> for ErrorCode {
17371695 AppError :: CleanDbIdTableNamesFailed ( err) => {
17381696 ErrorCode :: GeneralDbGcFailure ( err. message ( ) )
17391697 }
1740- AppError :: AutoIncrementError ( err) => ErrorCode :: AutoIncrementError ( err. message ( ) ) ,
17411698 }
17421699 }
17431700}
0 commit comments