@@ -19,7 +19,6 @@ use databend_common_meta_types::MatchSeq;
19
19
20
20
use crate :: data_mask:: data_mask_name_ident;
21
21
use crate :: principal:: procedure_name_ident;
22
- use crate :: principal:: AutoIncrementKey ;
23
22
use crate :: principal:: ProcedureIdentity ;
24
23
use crate :: row_access_policy:: row_access_policy_name_ident;
25
24
use crate :: schema:: catalog_name_ident;
@@ -968,22 +967,6 @@ impl UnsupportedSequenceStorageVersion {
968
967
}
969
968
}
970
969
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
-
987
970
/// Application error.
988
971
///
989
972
/// The application does not get expected result but there is nothing wrong with meta-service.
@@ -1165,9 +1148,6 @@ pub enum AppError {
1165
1148
#[ error( transparent) ]
1166
1149
SequenceError ( #[ from] SequenceError ) ,
1167
1150
1168
- #[ error( transparent) ]
1169
- AutoIncrementError ( #[ from] AutoIncrementError ) ,
1170
-
1171
1151
#[ error( transparent) ]
1172
1152
UpdateStreamMetasFailed ( #[ from] UpdateStreamMetasFailed ) ,
1173
1153
@@ -1236,12 +1216,6 @@ pub enum SequenceError {
1236
1216
UnsupportedSequenceStorageVersion ( #[ from] UnsupportedSequenceStorageVersion ) ,
1237
1217
}
1238
1218
1239
- #[ derive( thiserror:: Error , Debug , Clone , PartialEq , Eq ) ]
1240
- pub enum AutoIncrementError {
1241
- #[ error( transparent) ]
1242
- OutOfAutoIncrementRange ( #[ from] OutOfAutoIncrementRange ) ,
1243
- }
1244
-
1245
1219
impl AppErrorMessage for TenantIsEmpty {
1246
1220
fn message ( & self ) -> String {
1247
1221
self . to_string ( )
@@ -1594,22 +1568,6 @@ impl AppErrorMessage for SequenceError {
1594
1568
}
1595
1569
}
1596
1570
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
-
1613
1571
impl AppErrorMessage for VirtualColumnIdOutBound { }
1614
1572
1615
1573
impl AppErrorMessage for VirtualColumnTooMany { }
@@ -1737,7 +1695,6 @@ impl From<AppError> for ErrorCode {
1737
1695
AppError :: CleanDbIdTableNamesFailed ( err) => {
1738
1696
ErrorCode :: GeneralDbGcFailure ( err. message ( ) )
1739
1697
}
1740
- AppError :: AutoIncrementError ( err) => ErrorCode :: AutoIncrementError ( err. message ( ) ) ,
1741
1698
}
1742
1699
}
1743
1700
}
0 commit comments