This is an automated email from the ASF dual-hosted git repository.

coolfrog pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/horaedb.git


The following commit(s) were added to refs/heads/main by this push:
     new a1869dc6 chore: log more info for debug when tables with same name 
found (#1537)
a1869dc6 is described below

commit a1869dc670c7ca2a103063c60c6585f1780e5622
Author: kamille <[email protected]>
AuthorDate: Tue Jun 11 09:58:19 2024 +0800

    chore: log more info for debug when tables with same name found (#1537)
    
    ## Rationale
    We just panic but log nothing when found two tables with the same table
    name, it turns debugging into a disaster...
    
    ## Detailed Changes
    Log the needed table infos when found two tables with the same table
    name before panic.
    
    ## Test Plan
    Test maually.
---
 src/analytic_engine/src/table/data.rs | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/analytic_engine/src/table/data.rs 
b/src/analytic_engine/src/table/data.rs
index 2982454d..c9ba1662 100644
--- a/src/analytic_engine/src/table/data.rs
+++ b/src/analytic_engine/src/table/data.rs
@@ -796,6 +796,15 @@ impl TableDataSet {
     pub fn insert_if_absent(&mut self, table_data_ref: TableDataRef) -> bool {
         let table_name = &table_data_ref.name;
         if self.table_datas.contains_key(table_name) {
+            let exist_table = self.table_datas.get(table_name).unwrap();
+            logger::error!(
+                "found duplicated table_name:{}, exist_table_id:{}, 
exist_table_shard_id:{}, inserted_table_id:{}, inserted_table_shard_id:{}",
+                table_name,
+                exist_table.id,
+                exist_table.shard_info.shard_id,
+                table_data_ref.id,
+                table_data_ref.shard_info.shard_id,
+            );
             return false;
         }
         self.table_datas


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to