File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -38,19 +38,13 @@ static SHUTDOWN_LOCK_HOLDER_NUMS: LazyLock<Counter> =
38
38
const LABEL_TYPE : & str = "type" ;
39
39
const LABEL_TABLE_ID : & str = "table_id" ;
40
40
41
- pub fn record_created_lock_nums ( lock_type : String , table_id : u64 , num : u64 ) {
42
- let labels = & vec ! [
43
- ( LABEL_TYPE , lock_type) ,
44
- ( LABEL_TABLE_ID , table_id. to_string( ) ) ,
45
- ] ;
41
+ pub fn record_created_lock_nums ( lock_type : String , num : u64 ) {
42
+ let labels = & vec ! [ ( LABEL_TYPE , lock_type) ] ;
46
43
CREATED_LOCK_NUMS . get_or_create ( labels) . inc_by ( num) ;
47
44
}
48
45
49
- pub fn record_acquired_lock_nums ( lock_type : String , table_id : u64 , num : u64 ) {
50
- let labels = & vec ! [
51
- ( LABEL_TYPE , lock_type) ,
52
- ( LABEL_TABLE_ID , table_id. to_string( ) ) ,
53
- ] ;
46
+ pub fn record_acquired_lock_nums ( lock_type : String , num : u64 ) {
47
+ let labels = & vec ! [ ( LABEL_TYPE , lock_type) ] ;
54
48
ACQUIRED_LOCK_NUMS . get_or_create ( labels) . inc_by ( num) ;
55
49
}
56
50
Original file line number Diff line number Diff line change @@ -242,7 +242,6 @@ impl EncodeLabelSet for OperationLabels {
242
242
fn encode ( & self , mut encoder : LabelSetEncoder ) -> Result < ( ) , fmt:: Error > {
243
243
( observe:: LABEL_SCHEME , self . 0 . scheme . into_static ( ) ) . encode ( encoder. encode_label ( ) ) ?;
244
244
( observe:: LABEL_NAMESPACE , self . 0 . namespace . as_ref ( ) ) . encode ( encoder. encode_label ( ) ) ?;
245
- ( observe:: LABEL_ROOT , self . 0 . root . as_ref ( ) ) . encode ( encoder. encode_label ( ) ) ?;
246
245
( observe:: LABEL_OPERATION , self . 0 . operation ) . encode ( encoder. encode_label ( ) ) ?;
247
246
248
247
if let Some ( error) = & self . 0 . error {
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl LockHolder {
103
103
104
104
catalog. extend_lock_revision ( extend_table_lock_req) . await ?;
105
105
// metrics.
106
- record_acquired_lock_nums ( lock_type, table_id , 1 ) ;
106
+ record_acquired_lock_nums ( lock_type, 1 ) ;
107
107
break ;
108
108
}
109
109
@@ -174,7 +174,7 @@ impl LockHolder {
174
174
let res = catalog. create_lock_revision ( req) . await ?;
175
175
let revision = res. revision ;
176
176
// metrics.
177
- record_created_lock_nums ( lock_key. lock_type ( ) . to_string ( ) , lock_key . get_table_id ( ) , 1 ) ;
177
+ record_created_lock_nums ( lock_key. lock_type ( ) . to_string ( ) , 1 ) ;
178
178
log:: debug!( "create table lock success, revision={}" , revision) ;
179
179
180
180
let delete_table_lock_req = DeleteLockRevReq :: new ( lock_key. clone ( ) , revision) ;
You can’t perform that action at this time.
0 commit comments