From 61ba149e7787a80526b594c9565a6b18d305671e Mon Sep 17 00:00:00 2001 From: andylokandy Date: Wed, 19 Jun 2024 20:31:18 +0800 Subject: [PATCH 1/3] chore: update logcall --- Cargo.lock | 4 +- Cargo.toml | 2 +- src/meta/api/src/schema_api_impl.rs | 184 ++++++++-------------------- src/meta/api/src/share_api_impl.rs | 35 ++---- src/meta/service/src/network.rs | 2 +- 5 files changed, 67 insertions(+), 160 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c321aaf3781b..763c3d615ecf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9451,9 +9451,9 @@ dependencies = [ [[package]] name = "logcall" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d369db60a3256a6d47b13adcfff7ce37588d8b670bb3e334fa1cc8886cdfaa9" +checksum = "ad4135a4976fbbb61d3b1a31e9f8364e7943ad9d943f8ccd91a09286425e704d" dependencies = [ "proc-macro-error 1.0.4", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 8d6ebd5d6901..3147cf7354fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -251,7 +251,7 @@ http = "1" itertools = "0.10.5" jsonb = "0.4.0" log = { version = "0.4.21", features = ["serde", "kv_unstable_std"] } -logcall = "0.1.5" +logcall = "0.1.6" match-template = "0.0.1" minitrace = { version = "0.6.5", features = ["enable"] } minitrace-opentelemetry = "0.6.5" diff --git a/src/meta/api/src/schema_api_impl.rs b/src/meta/api/src/schema_api_impl.rs index e0c63076ab38..5d513b20683a 100644 --- a/src/meta/api/src/schema_api_impl.rs +++ b/src/meta/api/src/schema_api_impl.rs @@ -260,14 +260,12 @@ pub const ORPHAN_POSTFIX: &str = "orphan"; /// Thus every type that impl kvapi::KVApi impls SchemaApi. #[tonic::async_trait] impl + ?Sized> SchemaApi for KV { - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn create_database( &self, req: CreateDatabaseReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let name_key = &req.name_ident; if req.meta.drop_on.is_some() { @@ -384,11 +382,9 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn drop_database(&self, req: DropDatabaseReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -427,14 +423,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn undrop_database( &self, req: UndropDatabaseReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let name_key = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -531,14 +525,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn rename_database( &self, req: RenameDatabaseReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname = &req.name_ident; let tenant_newdbname = DatabaseNameIdent::new(tenant_dbname.tenant(), &req.new_db_name); @@ -673,11 +665,9 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_database(&self, req: GetDatabaseReq) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let name_key = &req.inner; let (_, db_id, db_meta_seq, db_meta) = @@ -695,14 +685,12 @@ impl + ?Sized> SchemaApi for KV { Ok(Arc::new(db)) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_database_history( &self, req: ListDatabaseReq, ) -> Result>, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - // List tables by tenant, db_id, table_name. let dbid_tbname_idlist = DatabaseIdHistoryIdent::new(&req.tenant, "dummy"); let dir_name = DirName::new(dbid_tbname_idlist); @@ -846,14 +834,12 @@ impl + ?Sized> SchemaApi for KV { return Ok(db_info_list); } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn list_databases( &self, req: ListDatabaseReq, ) -> Result>, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - // Using a empty db to to list all let name_key = DatabaseNameIdent::new(req.tenant(), ""); @@ -901,11 +887,9 @@ impl + ?Sized> SchemaApi for KV { Ok(db_infos) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn create_index(&self, req: CreateIndexReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_index = &req.name_ident; if req.meta.dropped_on.is_some() { @@ -1007,11 +991,9 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn drop_index(&self, req: DropIndexReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_index = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -1056,11 +1038,9 @@ impl + ?Sized> SchemaApi for KV { Ok(DropIndexReply {}) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_index(&self, req: GetIndexReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_index = &req.name_ident; let res = get_index_or_err(self, tenant_index).await?; @@ -1095,11 +1075,9 @@ impl + ?Sized> SchemaApi for KV { }) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn update_index(&self, req: UpdateIndexReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let index_id_key = IndexId { index_id: req.index_id, }; @@ -1122,14 +1100,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn list_indexes( &self, req: ListIndexesReq, ) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - // Get index id list by `prefix_list` "/" let ident = IndexNameIdent::new(&req.tenant, "dummy"); let prefix_key = ident.tenant_prefix(); @@ -1168,14 +1144,12 @@ impl + ?Sized> SchemaApi for KV { Ok(index_metas) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn list_index_ids_by_table_id( &self, req: ListIndexesByIdReq, ) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ident = IndexNameIdent::new(req.tenant.clone(), ""); let prefix = ident.to_string_key(); @@ -1207,14 +1181,12 @@ impl + ?Sized> SchemaApi for KV { Ok(index_ids) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn list_indexes_by_table_id( &self, req: ListIndexesByIdReq, ) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ident = IndexNameIdent::new(req.tenant.clone(), ""); let prefix = ident.to_string_key(); @@ -1247,13 +1219,12 @@ impl + ?Sized> SchemaApi for KV { // virtual column + #[logcall::logcall] #[minitrace::trace] async fn create_virtual_column( &self, req: CreateVirtualColumnReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ctx = func_name!(); let mut trials = txn_backoff(None, func_name!()); loop { @@ -1333,13 +1304,12 @@ impl + ?Sized> SchemaApi for KV { Ok(CreateVirtualColumnReply {}) } + #[logcall::logcall] #[minitrace::trace] async fn update_virtual_column( &self, req: UpdateVirtualColumnReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ctx = func_name!(); let mut trials = txn_backoff(None, func_name!()); @@ -1397,13 +1367,12 @@ impl + ?Sized> SchemaApi for KV { Ok(UpdateVirtualColumnReply {}) } + #[logcall::logcall] #[minitrace::trace] async fn drop_virtual_column( &self, req: DropVirtualColumnReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ctx = func_name!(); let mut trials = txn_backoff(None, func_name!()); @@ -1446,13 +1415,12 @@ impl + ?Sized> SchemaApi for KV { Ok(DropVirtualColumnReply {}) } + #[logcall::logcall] #[minitrace::trace] async fn list_virtual_columns( &self, req: ListVirtualColumnsReq, ) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - if let Some(table_id) = req.table_id { let name_ident = VirtualColumnIdent::new(&req.tenant, table_id); let (_, virtual_column_opt): (_, Option) = @@ -1479,7 +1447,7 @@ impl + ?Sized> SchemaApi for KV { Ok(virtual_column_list) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn create_table(&self, req: CreateTableReq) -> Result { // Make an error if table exists. @@ -1506,8 +1474,6 @@ impl + ?Sized> SchemaApi for KV { } } - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname_tbname = &req.name_ident; let tenant_dbname = req.name_ident.db_name_ident(); @@ -1820,28 +1786,24 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn undrop_table(&self, req: UndropTableReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); handle_undrop_table(self, req).await } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn undrop_table_by_id( &self, req: UndropTableByIdReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); handle_undrop_table(self, req).await } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn rename_table(&self, req: RenameTableReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname_tbname = &req.name_ident; let tenant_dbname = tenant_dbname_tbname.db_name_ident(); let tenant_newdbname_newtbname = TableNameIdent { @@ -2034,11 +1996,9 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_table(&self, req: GetTableReq) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname_tbname = &req.inner; let tenant_dbname = tenant_dbname_tbname.db_name_ident(); @@ -2128,14 +2088,12 @@ impl + ?Sized> SchemaApi for KV { return Ok(Arc::new(tb_info)); } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_table_history( &self, req: ListTableReq, ) -> Result>, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname = &req.inner; // Get db by name to ensure presence @@ -2263,11 +2221,9 @@ impl + ?Sized> SchemaApi for KV { return Ok(tb_info_list); } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn list_tables(&self, req: ListTableReq) -> Result>, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant_dbname = &req.inner; // Get db by name to ensure presence @@ -2306,28 +2262,24 @@ impl + ?Sized> SchemaApi for KV { Ok(tb_infos) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_table_by_id( &self, table_id: MetaId, ) -> Result>, MetaError> { - debug!(req :? =(&table_id); "SchemaApi: {}", func_name!()); - let id = TableId { table_id }; let seq_table_meta = self.get_pb(&id).await?; Ok(seq_table_meta) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn mget_table_names_by_ids( &self, table_ids: &[MetaId], ) -> Result>, KVAppError> { - debug!(req :? =(&table_ids); "SchemaApi: {}", func_name!()); - let mut id_name_kv_keys = Vec::with_capacity(table_ids.len()); for id in table_ids { let k = TableIdToName { table_id: *id }.to_string_key(); @@ -2366,11 +2318,9 @@ impl + ?Sized> SchemaApi for KV { Ok(table_names) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_db_name_by_id(&self, db_id: u64) -> Result { - debug!(req :? =(&db_id); "SchemaApi: {}", func_name!()); - let db_id_to_name_key = DatabaseIdToName { db_id }; let (meta_seq, db_name): (_, Option) = @@ -2387,7 +2337,7 @@ impl + ?Sized> SchemaApi for KV { Ok(db_name.unwrap().database_name().to_string()) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn mget_database_names_by_ids( &self, @@ -2433,11 +2383,10 @@ impl + ?Sized> SchemaApi for KV { Ok(db_names) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn drop_table_by_id(&self, req: DropTableByIdReq) -> Result { let table_id = req.tb_id; - debug!(req :? =(&table_id); "SchemaApi: {}", func_name!()); let tenant = &req.tenant; @@ -2494,14 +2443,12 @@ impl + ?Sized> SchemaApi for KV { // make table meta visible by: // 1. move table id from orphan table id list to table id list // 2. set table meta.drop_on as None + #[logcall::logcall] #[minitrace::trace] async fn commit_table_meta( &self, req: CommitTableMetaReq, ) -> Result { - let table_id = req.table_id; - debug!(req :? =(&table_id); "SchemaApi: {}", func_name!()); - let tenant_dbname_tbname = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -2662,17 +2609,14 @@ impl + ?Sized> SchemaApi for KV { } } + #[logcall::logcall] #[minitrace::trace] async fn get_table_copied_file_info( &self, req: GetTableCopiedFileReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let table_id = req.table_id; - let tbid = TableId { table_id }; - let (tb_meta_seq, tb_meta): (_, Option) = get_pb_value(self, &tbid).await?; if tb_meta_seq == 0 { @@ -2718,7 +2662,7 @@ impl + ?Sized> SchemaApi for KV { }) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn truncate_table( &self, @@ -2727,8 +2671,6 @@ impl + ?Sized> SchemaApi for KV { // NOTE: this method read and remove in multiple transactions. // It is not atomic, but it is safe because it deletes only the files that matches the seq. - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ctx = func_name!(); let table_id = TableId { @@ -2828,14 +2770,12 @@ impl + ?Sized> SchemaApi for KV { Ok(TruncateTableReply {}) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn upsert_table_option( &self, req: UpsertTableOptionReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tbid = TableId { table_id: req.table_id, }; @@ -2903,13 +2843,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn update_table_meta( &self, req: UpdateTableMetaReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); let tbid = TableId { table_id: req.table_id, }; @@ -3242,13 +3181,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn set_table_column_mask_policy( &self, req: SetTableColumnMaskPolicyReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); let tbid = TableId { table_id: req.table_id, }; @@ -3335,14 +3273,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn create_table_index( &self, req: CreateTableIndexReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tbid = TableId { table_id: req.table_id, }; @@ -3445,14 +3381,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn drop_table_index( &self, req: DropTableIndexReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tbid = TableId { table_id: req.table_id, }; @@ -3507,14 +3441,12 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_drop_table_infos( &self, req: ListDroppedTableReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - if let TableInfoFilter::AllDroppedTables(filter_drop_on) = &req.filter { let db_infos = self .get_database_history(ListDatabaseReq { @@ -3730,13 +3662,12 @@ impl + ?Sized> SchemaApi for KV { Ok(reply) } + #[logcall::logcall] #[minitrace::trace] async fn create_lock_revision( &self, req: CreateLockRevReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let lock_key = &req.lock_key; let lock_type = lock_key.lock_type(); let extra_info = lock_key.get_extra_info(); @@ -3800,10 +3731,9 @@ impl + ?Sized> SchemaApi for KV { Ok(CreateLockRevReply { revision }) } + #[logcall::logcall] #[minitrace::trace] async fn extend_lock_revision(&self, req: ExtendLockRevReq) -> Result<(), KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let ctx = func_name!(); let lock_key = &req.lock_key; @@ -3863,10 +3793,9 @@ impl + ?Sized> SchemaApi for KV { Ok(()) } + #[logcall::logcall] #[minitrace::trace] async fn delete_lock_revision(&self, req: DeleteLockRevReq) -> Result<(), KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let lock_key = &req.lock_key; let revision = req.revision; @@ -3910,6 +3839,7 @@ impl + ?Sized> SchemaApi for KV { Ok(()) } + #[logcall::logcall] #[minitrace::trace] async fn list_locks(&self, req: ListLocksReq) -> Result, KVAppError> { let mut reply = vec![]; @@ -3941,14 +3871,12 @@ impl + ?Sized> SchemaApi for KV { Ok(reply) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn create_catalog( &self, req: CreateCatalogReq, ) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let name_key = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -4020,11 +3948,9 @@ impl + ?Sized> SchemaApi for KV { } } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn get_catalog(&self, req: GetCatalogReq) -> Result, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let name_key = &req.inner; let (_, catalog_id, _, catalog_meta) = @@ -4039,11 +3965,9 @@ impl + ?Sized> SchemaApi for KV { Ok(Arc::new(catalog)) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn drop_catalog(&self, req: DropCatalogReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let name_key = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -4115,14 +4039,12 @@ impl + ?Sized> SchemaApi for KV { Ok(DropCatalogReply {}) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn list_catalogs( &self, req: ListCatalogReq, ) -> Result>, KVAppError> { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let tenant = req.tenant; let name_key = CatalogNameIdent::new(&tenant, ""); @@ -4168,10 +4090,9 @@ impl + ?Sized> SchemaApi for KV { Ok(catalog_infos) } + #[logcall::logcall] #[minitrace::trace] async fn set_table_lvt(&self, req: SetLVTReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let table_id = req.table_id; let mut trials = txn_backoff(None, func_name!()); @@ -4214,10 +4135,9 @@ impl + ?Sized> SchemaApi for KV { } } + #[logcall::logcall] #[minitrace::trace] async fn get_table_lvt(&self, req: GetLVTReq) -> Result { - debug!(req :? =(&req); "SchemaApi: {}", func_name!()); - let table_id = req.table_id; let lvt_key = LeastVisibleTimeKey { table_id }; @@ -4916,7 +4836,7 @@ fn set_update_expire_operation( Ok(()) } -#[logcall::logcall("debug")] +#[logcall::logcall(input = "")] #[minitrace::trace] async fn batch_filter_table_info( kv_api: &(impl kvapi::KVApi + ?Sized), @@ -4977,7 +4897,7 @@ async fn batch_filter_table_info( type TableFilterInfoList<'a> = Vec<(&'a TableInfoFilter, &'a Arc, u64, String)>; -#[logcall::logcall("debug")] +#[logcall::logcall(input = "")] #[minitrace::trace] async fn get_gc_table_info( kv_api: &(impl kvapi::KVApi + ?Sized), @@ -5037,7 +4957,7 @@ async fn get_gc_table_info( Ok(filter_tb_infos) } -#[logcall::logcall("debug")] +#[logcall::logcall(input = "")] #[minitrace::trace] async fn do_get_table_history( kv_api: &(impl kvapi::KVApi + ?Sized), diff --git a/src/meta/api/src/share_api_impl.rs b/src/meta/api/src/share_api_impl.rs index 4475c0a52c44..684ad884ba0e 100644 --- a/src/meta/api/src/share_api_impl.rs +++ b/src/meta/api/src/share_api_impl.rs @@ -82,22 +82,18 @@ use crate::ShareApi; /// Thus every type that impl kvapi::KVApi impls ShareApi. #[async_trait::async_trait] impl> ShareApi for KV { - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn show_shares(&self, req: ShowSharesReq) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - // Get all outbound share accounts. let outbound_accounts = get_outbound_share_infos_by_tenant(self, &req.tenant).await?; Ok(ShowSharesReply { outbound_accounts }) } - #[logcall::logcall("debug")] + #[logcall::logcall] #[minitrace::trace] async fn create_share(&self, req: CreateShareReq) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -179,9 +175,8 @@ impl> ShareApi for KV { // iterator all the granted objects(from ShareMeta.{database|entries}), // remove share id from ObjectSharedByShareIds // drop all the databases created from the share(from ShareMeta.share_from_db_ids), + #[logcall::logcall] async fn drop_share(&self, req: DropShareReq) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -306,12 +301,11 @@ impl> ShareApi for KV { } } + #[logcall::logcall] async fn add_share_tenants( &self, req: AddShareAccountsReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -414,12 +408,11 @@ impl> ShareApi for KV { } } + #[logcall::logcall] async fn remove_share_tenants( &self, req: RemoveShareAccountsReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -530,12 +523,11 @@ impl> ShareApi for KV { } } + #[logcall::logcall] async fn grant_share_object( &self, req: GrantShareObjectReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let share_name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -650,12 +642,11 @@ impl> ShareApi for KV { } } + #[logcall::logcall] async fn revoke_share_object( &self, req: RevokeShareObjectReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let share_name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -786,12 +777,11 @@ impl> ShareApi for KV { } } + #[logcall::logcall] async fn get_share_grant_objects( &self, req: GetShareGrantObjectReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let share_name_key = &req.share_name; let res = get_share_or_err( @@ -971,12 +961,11 @@ impl> ShareApi for KV { Ok(GetObjectGrantPrivilegesReply { privileges }) } + #[logcall::logcall] async fn create_share_endpoint( &self, req: CreateShareEndpointReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.endpoint; let mut trials = txn_backoff(None, func_name!()); @@ -1070,12 +1059,11 @@ impl> ShareApi for KV { } } + #[logcall::logcall] async fn upsert_share_endpoint( &self, req: UpsertShareEndpointReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.endpoint; let mut trials = txn_backoff(None, func_name!()); @@ -1221,12 +1209,11 @@ impl> ShareApi for KV { }) } + #[logcall::logcall] async fn drop_share_endpoint( &self, req: DropShareEndpointReq, ) -> Result { - debug!(req :? =(&req); "ShareApi: {}", func_name!()); - let name_key = &req.endpoint; let mut trials = txn_backoff(None, func_name!()); diff --git a/src/meta/service/src/network.rs b/src/meta/service/src/network.rs index 6d0563af8052..cac8fce32b94 100644 --- a/src/meta/service/src/network.rs +++ b/src/meta/service/src/network.rs @@ -410,7 +410,7 @@ impl RaftNetwork for NetworkConnection { self.parse_grpc_resp(grpc_res) } - #[logcall::logcall(err = "debug")] + #[logcall::logcall(err = "debug", input = "")] #[minitrace::trace] async fn full_snapshot( &mut self, From 422d6d6701d12eb36d2510c3a995f2a3feebfebb Mon Sep 17 00:00:00 2001 From: andylokandy Date: Thu, 20 Jun 2024 00:24:39 +0800 Subject: [PATCH 2/3] fix --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 763c3d615ecf..7565006a39ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9451,9 +9451,9 @@ dependencies = [ [[package]] name = "logcall" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad4135a4976fbbb61d3b1a31e9f8364e7943ad9d943f8ccd91a09286425e704d" +checksum = "4bb377687ad730d661a29ee17ca44644d388c72f0d8a83d69a75744a6041b1c3" dependencies = [ "proc-macro-error 1.0.4", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 3147cf7354fc..a38ae209bc03 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -251,7 +251,7 @@ http = "1" itertools = "0.10.5" jsonb = "0.4.0" log = { version = "0.4.21", features = ["serde", "kv_unstable_std"] } -logcall = "0.1.6" +logcall = "0.1.9" match-template = "0.0.1" minitrace = { version = "0.6.5", features = ["enable"] } minitrace-opentelemetry = "0.6.5" From 9e2ca65a61dd1e0becfebdaa94c82103f46434d5 Mon Sep 17 00:00:00 2001 From: andylokandy Date: Sun, 23 Jun 2024 16:53:39 +0800 Subject: [PATCH 3/3] update --- src/meta/api/src/schema_api_impl.rs | 90 +++++++++++++++++++++++++++++ src/meta/api/src/share_api_impl.rs | 22 +++++++ 2 files changed, 112 insertions(+) diff --git a/src/meta/api/src/schema_api_impl.rs b/src/meta/api/src/schema_api_impl.rs index af8781615185..c1d67dcac113 100644 --- a/src/meta/api/src/schema_api_impl.rs +++ b/src/meta/api/src/schema_api_impl.rs @@ -266,6 +266,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: CreateDatabaseReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let name_key = &req.name_ident; if req.meta.drop_on.is_some() { @@ -385,6 +387,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn drop_database(&self, req: DropDatabaseReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -429,6 +433,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: UndropDatabaseReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let name_key = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -531,6 +537,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: RenameDatabaseReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname = &req.name_ident; let tenant_newdbname = DatabaseNameIdent::new(tenant_dbname.tenant(), &req.new_db_name); @@ -668,6 +676,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn get_database(&self, req: GetDatabaseReq) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let name_key = &req.inner; let (_, db_id, db_meta_seq, db_meta) = @@ -691,6 +701,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListDatabaseReq, ) -> Result>, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + // List tables by tenant, db_id, table_name. let dbid_tbname_idlist = DatabaseIdHistoryIdent::new(&req.tenant, "dummy"); let dir_name = DirName::new(dbid_tbname_idlist); @@ -840,6 +852,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListDatabaseReq, ) -> Result>, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + // Using a empty db to to list all let name_key = DatabaseNameIdent::new(req.tenant(), ""); @@ -890,6 +904,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn create_index(&self, req: CreateIndexReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_index = &req.name_ident; if req.meta.dropped_on.is_some() { @@ -994,6 +1010,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn drop_index(&self, req: DropIndexReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_index = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -1041,6 +1059,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn get_index(&self, req: GetIndexReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_index = &req.name_ident; let res = get_index_or_err(self, tenant_index).await?; @@ -1078,6 +1098,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn update_index(&self, req: UpdateIndexReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let index_id_key = IndexId { index_id: req.index_id, }; @@ -1106,6 +1128,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListIndexesReq, ) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + // Get index id list by `prefix_list` "/" let ident = IndexNameIdent::new(&req.tenant, "dummy"); let prefix_key = ident.tenant_prefix(); @@ -1150,6 +1174,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListIndexesByIdReq, ) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ident = IndexNameIdent::new(req.tenant.clone(), ""); let prefix = ident.to_string_key(); @@ -1187,6 +1213,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListIndexesByIdReq, ) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ident = IndexNameIdent::new(req.tenant.clone(), ""); let prefix = ident.to_string_key(); @@ -1225,6 +1253,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: CreateVirtualColumnReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ctx = func_name!(); let mut trials = txn_backoff(None, func_name!()); loop { @@ -1310,6 +1340,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: UpdateVirtualColumnReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ctx = func_name!(); let mut trials = txn_backoff(None, func_name!()); @@ -1373,6 +1405,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: DropVirtualColumnReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ctx = func_name!(); let mut trials = txn_backoff(None, func_name!()); @@ -1421,6 +1455,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListVirtualColumnsReq, ) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + if let Some(table_id) = req.table_id { let name_ident = VirtualColumnIdent::new(&req.tenant, table_id); let (_, virtual_column_opt): (_, Option) = @@ -1474,6 +1510,8 @@ impl + ?Sized> SchemaApi for KV { } } + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname_tbname = &req.name_ident; let tenant_dbname = req.name_ident.db_name_ident(); @@ -1789,6 +1827,7 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn undrop_table(&self, req: UndropTableReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); handle_undrop_table(self, req).await } @@ -1798,12 +1837,15 @@ impl + ?Sized> SchemaApi for KV { &self, req: UndropTableByIdReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); handle_undrop_table(self, req).await } #[logcall::logcall] #[minitrace::trace] async fn rename_table(&self, req: RenameTableReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname_tbname = &req.name_ident; let tenant_dbname = tenant_dbname_tbname.db_name_ident(); let tenant_newdbname_newtbname = TableNameIdent { @@ -1999,6 +2041,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn get_table(&self, req: GetTableReq) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname_tbname = &req.inner; let tenant_dbname = tenant_dbname_tbname.db_name_ident(); @@ -2095,6 +2139,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListTableReq, ) -> Result>, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname = &req.inner; // Get db by name to ensure presence @@ -2226,6 +2272,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn list_tables(&self, req: ListTableReq) -> Result>, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant_dbname = &req.inner; // Get db by name to ensure presence @@ -2270,6 +2318,8 @@ impl + ?Sized> SchemaApi for KV { &self, table_id: MetaId, ) -> Result>, MetaError> { + debug!(req :? =(&table_id); "SchemaApi: {}", func_name!()); + let id = TableId { table_id }; let seq_table_meta = self.get_pb(&id).await?; @@ -2282,6 +2332,8 @@ impl + ?Sized> SchemaApi for KV { &self, table_ids: &[MetaId], ) -> Result>, KVAppError> { + debug!(req :? =(&table_ids); "SchemaApi: {}", func_name!()); + let mut id_name_kv_keys = Vec::with_capacity(table_ids.len()); for id in table_ids { let k = TableIdToName { table_id: *id }.to_string_key(); @@ -2323,6 +2375,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn get_db_name_by_id(&self, db_id: u64) -> Result { + debug!(req :? =(&db_id); "SchemaApi: {}", func_name!()); + let db_id_to_name_key = DatabaseIdToName { db_id }; let (meta_seq, db_name): (_, Option) = @@ -2405,6 +2459,7 @@ impl + ?Sized> SchemaApi for KV { #[minitrace::trace] async fn drop_table_by_id(&self, req: DropTableByIdReq) -> Result { let table_id = req.tb_id; + debug!(req :? =(&table_id); "SchemaApi: {}", func_name!()); let tenant = &req.tenant; @@ -2467,6 +2522,9 @@ impl + ?Sized> SchemaApi for KV { &self, req: CommitTableMetaReq, ) -> Result { + let table_id = req.table_id; + debug!(req :? =(&table_id); "SchemaApi: {}", func_name!()); + let tenant_dbname_tbname = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -2633,6 +2691,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: GetTableCopiedFileReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let table_id = req.table_id; let tbid = TableId { table_id }; let (tb_meta_seq, tb_meta): (_, Option) = get_pb_value(self, &tbid).await?; @@ -2689,6 +2749,8 @@ impl + ?Sized> SchemaApi for KV { // NOTE: this method read and remove in multiple transactions. // It is not atomic, but it is safe because it deletes only the files that matches the seq. + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ctx = func_name!(); let table_id = TableId { @@ -2794,6 +2856,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: UpsertTableOptionReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tbid = TableId { table_id: req.table_id, }; @@ -2867,6 +2931,7 @@ impl + ?Sized> SchemaApi for KV { &self, req: UpdateTableMetaReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); let tbid = TableId { table_id: req.table_id, }; @@ -3205,6 +3270,7 @@ impl + ?Sized> SchemaApi for KV { &self, req: SetTableColumnMaskPolicyReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); let tbid = TableId { table_id: req.table_id, }; @@ -3297,6 +3363,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: CreateTableIndexReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tbid = TableId { table_id: req.table_id, }; @@ -3405,6 +3473,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: DropTableIndexReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tbid = TableId { table_id: req.table_id, }; @@ -3465,6 +3535,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListDroppedTableReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + if let TableInfoFilter::AllDroppedTables(filter_drop_on) = &req.filter { let db_infos = self .get_database_history(ListDatabaseReq { @@ -3686,6 +3758,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: CreateLockRevReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let lock_key = &req.lock_key; let lock_type = lock_key.lock_type(); let extra_info = lock_key.get_extra_info(); @@ -3752,6 +3826,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn extend_lock_revision(&self, req: ExtendLockRevReq) -> Result<(), KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let ctx = func_name!(); let lock_key = &req.lock_key; @@ -3814,6 +3890,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn delete_lock_revision(&self, req: DeleteLockRevReq) -> Result<(), KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let lock_key = &req.lock_key; let revision = req.revision; @@ -3895,6 +3973,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: CreateCatalogReq, ) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let name_key = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -3969,6 +4049,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn get_catalog(&self, req: GetCatalogReq) -> Result, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let name_key = &req.inner; let (_, catalog_id, _, catalog_meta) = @@ -3986,6 +4068,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn drop_catalog(&self, req: DropCatalogReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let name_key = &req.name_ident; let mut trials = txn_backoff(None, func_name!()); @@ -4063,6 +4147,8 @@ impl + ?Sized> SchemaApi for KV { &self, req: ListCatalogReq, ) -> Result>, KVAppError> { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let tenant = req.tenant; let name_key = CatalogNameIdent::new(&tenant, ""); @@ -4111,6 +4197,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn set_table_lvt(&self, req: SetLVTReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let table_id = req.table_id; let mut trials = txn_backoff(None, func_name!()); @@ -4156,6 +4244,8 @@ impl + ?Sized> SchemaApi for KV { #[logcall::logcall] #[minitrace::trace] async fn get_table_lvt(&self, req: GetLVTReq) -> Result { + debug!(req :? =(&req); "SchemaApi: {}", func_name!()); + let table_id = req.table_id; let lvt_key = LeastVisibleTimeKey { table_id }; diff --git a/src/meta/api/src/share_api_impl.rs b/src/meta/api/src/share_api_impl.rs index 684ad884ba0e..2054cda69cf7 100644 --- a/src/meta/api/src/share_api_impl.rs +++ b/src/meta/api/src/share_api_impl.rs @@ -85,6 +85,8 @@ impl> ShareApi for KV { #[logcall::logcall] #[minitrace::trace] async fn show_shares(&self, req: ShowSharesReq) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + // Get all outbound share accounts. let outbound_accounts = get_outbound_share_infos_by_tenant(self, &req.tenant).await?; @@ -94,6 +96,8 @@ impl> ShareApi for KV { #[logcall::logcall] #[minitrace::trace] async fn create_share(&self, req: CreateShareReq) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -177,6 +181,8 @@ impl> ShareApi for KV { // drop all the databases created from the share(from ShareMeta.share_from_db_ids), #[logcall::logcall] async fn drop_share(&self, req: DropShareReq) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -306,6 +312,8 @@ impl> ShareApi for KV { &self, req: AddShareAccountsReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -413,6 +421,8 @@ impl> ShareApi for KV { &self, req: RemoveShareAccountsReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -528,6 +538,8 @@ impl> ShareApi for KV { &self, req: GrantShareObjectReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let share_name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -647,6 +659,8 @@ impl> ShareApi for KV { &self, req: RevokeShareObjectReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let share_name_key = &req.share_name; let mut trials = txn_backoff(None, func_name!()); @@ -782,6 +796,8 @@ impl> ShareApi for KV { &self, req: GetShareGrantObjectReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let share_name_key = &req.share_name; let res = get_share_or_err( @@ -966,6 +982,8 @@ impl> ShareApi for KV { &self, req: CreateShareEndpointReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.endpoint; let mut trials = txn_backoff(None, func_name!()); @@ -1064,6 +1082,8 @@ impl> ShareApi for KV { &self, req: UpsertShareEndpointReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.endpoint; let mut trials = txn_backoff(None, func_name!()); @@ -1214,6 +1234,8 @@ impl> ShareApi for KV { &self, req: DropShareEndpointReq, ) -> Result { + debug!(req :? =(&req); "ShareApi: {}", func_name!()); + let name_key = &req.endpoint; let mut trials = txn_backoff(None, func_name!());