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> =
3838const LABEL_TYPE : & str = "type" ;
3939const LABEL_TABLE_ID : & str = "table_id" ;
4040
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) ] ;
4643 CREATED_LOCK_NUMS . get_or_create ( labels) . inc_by ( num) ;
4744}
4845
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) ] ;
5448 ACQUIRED_LOCK_NUMS . get_or_create ( labels) . inc_by ( num) ;
5549}
5650
Original file line number Diff line number Diff line change @@ -242,7 +242,6 @@ impl EncodeLabelSet for OperationLabels {
242242 fn encode ( & self , mut encoder : LabelSetEncoder ) -> Result < ( ) , fmt:: Error > {
243243 ( observe:: LABEL_SCHEME , self . 0 . scheme . into_static ( ) ) . encode ( encoder. encode_label ( ) ) ?;
244244 ( 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 ( ) ) ?;
246245 ( observe:: LABEL_OPERATION , self . 0 . operation ) . encode ( encoder. encode_label ( ) ) ?;
247246
248247 if let Some ( error) = & self . 0 . error {
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ impl LockHolder {
103103
104104 catalog. extend_lock_revision ( extend_table_lock_req) . await ?;
105105 // metrics.
106- record_acquired_lock_nums ( lock_type, table_id , 1 ) ;
106+ record_acquired_lock_nums ( lock_type, 1 ) ;
107107 break ;
108108 }
109109
@@ -174,7 +174,7 @@ impl LockHolder {
174174 let res = catalog. create_lock_revision ( req) . await ?;
175175 let revision = res. revision ;
176176 // 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 ) ;
178178 log:: debug!( "create table lock success, revision={}" , revision) ;
179179
180180 let delete_table_lock_req = DeleteLockRevReq :: new ( lock_key. clone ( ) , revision) ;
You can’t perform that action at this time.
0 commit comments