This is an automated email from the ASF dual-hosted git repository.
tanruixiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-horaedb.git
The following commit(s) were added to refs/heads/dev by this push:
new da4e7eae fix: missing and verbose logs (#1398)
da4e7eae is described below
commit da4e7eae598a378dba906f04f03f90c7886f6bbc
Author: WEI Xikai <[email protected]>
AuthorDate: Fri Dec 22 12:44:25 2023 +0800
fix: missing and verbose logs (#1398)
## Rationale
Some logs about query are verbose and some key logs about opening shard
are missing.
## Detailed Changes
Remove verbose logs and add missing key logs.
## Test Plan
CI.
---
analytic_engine/src/instance/open.rs | 8 +++++++-
analytic_engine/src/manifest/details.rs | 4 ++--
query_engine/src/datafusion_impl/executor.rs | 10 +++++-----
query_engine/src/datafusion_impl/physical_plan.rs | 4 ++--
4 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/analytic_engine/src/instance/open.rs
b/analytic_engine/src/instance/open.rs
index 6fcf29d0..8c840bf8 100644
--- a/analytic_engine/src/instance/open.rs
+++ b/analytic_engine/src/instance/open.rs
@@ -327,7 +327,13 @@ impl ShardOpener {
space,
})
}
- Ok(None) => *state = TableOpenStage::Success(None),
+ Ok(None) => {
+ error!(
+ "ShardOpener trie to open a dropped table,
table:{:?}, shard_id:{}",
+ ctx.table_def, self.shard_id
+ );
+ *state = TableOpenStage::Success(None);
+ }
Err(e) => *state = TableOpenStage::Failed(e),
}
}
diff --git a/analytic_engine/src/manifest/details.rs
b/analytic_engine/src/manifest/details.rs
index 9a23cd88..92810fff 100644
--- a/analytic_engine/src/manifest/details.rs
+++ b/analytic_engine/src/manifest/details.rs
@@ -540,7 +540,7 @@ impl Manifest for ManifestImpl {
snapshot_store,
};
let meta_snapshot_opt = recover.recover().await?.and_then(|v| v.data);
-
+ let meta_snapshot_exists = meta_snapshot_opt.is_some();
// Apply it to table.
if let Some(snapshot) = meta_snapshot_opt {
let meta_edit = MetaEdit::Snapshot(snapshot);
@@ -552,7 +552,7 @@ impl Manifest for ManifestImpl {
self.table_meta_set.apply_edit_to_table(request)?;
}
- info!("Manifest recover finish, request:{load_req:?}");
+ info!("Manifest recover finish, request:{load_req:?},
meta_snapshot_exist:{meta_snapshot_exists}");
Ok(())
}
diff --git a/query_engine/src/datafusion_impl/executor.rs
b/query_engine/src/datafusion_impl/executor.rs
index 83208d1f..0412c1d1 100644
--- a/query_engine/src/datafusion_impl/executor.rs
+++ b/query_engine/src/datafusion_impl/executor.rs
@@ -16,7 +16,7 @@ use std::{sync::Arc, time::Instant};
use async_trait::async_trait;
use generic_error::BoxError;
-use logger::info;
+use logger::debug;
use snafu::ResultExt;
use table_engine::stream::SendableRecordBatchStream;
use time_ext::InstantExt;
@@ -70,8 +70,8 @@ impl Executor for DatafusionExecutorImpl {
ctx: &Context,
physical_plan: PhysicalPlanPtr,
) -> Result<SendableRecordBatchStream> {
- info!(
- "DatafusionExecutorImpl begin to execute plan, request_id:{},
physical_plan: {:?}",
+ debug!(
+ "DatafusionExecutorImpl begin to execute plan, request_id:{},
physical_plan:{:?}",
ctx.request_id, physical_plan
);
@@ -87,8 +87,8 @@ impl Executor for DatafusionExecutorImpl {
msg: Some("failed to execute physical plan".to_string()),
})?;
- info!(
- "DatafusionExecutorImpl finish to execute plan, request_id:{},
cost:{}ms, plan_and_metrics: {}",
+ debug!(
+ "DatafusionExecutorImpl finish to execute plan, request_id:{},
cost:{}ms, plan_and_metrics:{}",
ctx.request_id,
begin_instant.saturating_elapsed().as_millis(),
physical_plan.metrics_to_string()
diff --git a/query_engine/src/datafusion_impl/physical_plan.rs
b/query_engine/src/datafusion_impl/physical_plan.rs
index 583db574..60ba23f5 100644
--- a/query_engine/src/datafusion_impl/physical_plan.rs
+++ b/query_engine/src/datafusion_impl/physical_plan.rs
@@ -26,7 +26,7 @@ use datafusion::physical_plan::{
ExecutionPlan,
};
use generic_error::BoxError;
-use logger::info;
+use logger::debug;
use snafu::{OptionExt, ResultExt};
use table_engine::stream::{FromDfStream, SendableRecordBatchStream};
@@ -109,7 +109,7 @@ impl PhysicalPlan for DataFusionPhysicalPlanAdapter {
Arc::new(CoalescePartitionsExec::new(executable))
};
- info!(
+ debug!(
"DatafusionExecutorImpl get the executable plan, request_id:{},
physical_plan:{}",
df_task_ctx.ctx.request_id,
displayable(executable.as_ref()).indent(true)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]