Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: reduce kafka logs #986

Merged
merged 2 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ endif
fix:
cargo fmt
cargo sort --workspace
cargo clippy --fix --all-targets --all-features --workspace -- -D warnings
cargo clippy --fix --allow-staged --all-targets --all-features --workspace -- -D warnings
1 change: 1 addition & 0 deletions analytic_engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@ common_util = { workspace = true, features = ["test"] }
env_logger = { workspace = true }
pin-project-lite = { workspace = true }
rand = { workspace = true }
tempfile = { workspace = true }
wal = { workspace = true, features = ["test"] }
8 changes: 4 additions & 4 deletions wal/src/message_queue_impl/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use util::*;
use crate::{
kv_encoder::CommonLogEncoding,
log_batch::{LogEntry, LogWriteBatch},
manager::{self},
manager,
message_queue_impl::{
encoding::{format_wal_data_topic_name, format_wal_meta_topic_name, MetaEncoding},
log_cleaner::LogCleaner,
Expand Down Expand Up @@ -258,7 +258,7 @@ impl<M: MessageQueue> Region<M> {
})?;

ensure!(returned_high_watermark == high_watermark, OpenNoCause { namespace , region_id, msg: format!(
"failed while recover from meta, high watermark shouldn't changed while opening region,
"failed while recover from meta, high watermark shouldn't changed while opening region,
origin high watermark:{high_watermark}, returned high watermark:{returned_high_watermark}")
});

Expand Down Expand Up @@ -375,7 +375,7 @@ impl<M: MessageQueue> Region<M> {
})?;

ensure!(returned_high_watermark == high_watermark, OpenNoCause { namespace , region_id, msg: format!(
"failed while recover from log, high watermark shouldn't changed while opening region,
"failed while recover from log, high watermark shouldn't changed while opening region,
origin high watermark:{high_watermark}, returned high watermark:{returned_high_watermark}")
});

Expand Down Expand Up @@ -702,7 +702,7 @@ impl<M: MessageQueue> RegionInner<M> {
.await
.map_err(Box::new)?;

debug!("Create scanning iterator successfully, region id:{}, table id:{:?}, log topic:{}, scan range{:?}", self.region_context.region_id(),
debug!("Create scanning iterator successfully, region id:{}, table id:{:?}, log topic:{}, scan range{:?}", self.region_context.region_id(),
table_id, self.log_topic, scan_range);

Ok(MessageQueueLogIterator::new(
Expand Down
11 changes: 3 additions & 8 deletions wal/src/message_queue_impl/snapshot_synchronizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use common_util::{
define_result,
error::{BoxError, GenericError},
};
use log::info;
use log::debug;
use message_queue::MessageQueue;
use snafu::{ensure, Backtrace, ResultExt, Snafu};

Expand Down Expand Up @@ -67,11 +67,6 @@ impl<Mq: MessageQueue> SnapshotSynchronizer<Mq> {
meta_topic: String,
meta_encoding: MetaEncoding,
) -> Self {
info!(
"Snapshot synchronizer init, region id:{}, meta topic:{}",
region_id, meta_topic
);

Self {
region_id,
message_queue,
Expand All @@ -81,7 +76,7 @@ impl<Mq: MessageQueue> SnapshotSynchronizer<Mq> {
}

pub async fn sync(&self, snapshot: RegionMetaSnapshot) -> Result<()> {
info!(
debug!(
"Begin to sync snapshot to meta topic, snapshot:{:?}, topic:{}",
snapshot, self.meta_topic
);
Expand Down Expand Up @@ -140,7 +135,7 @@ impl<Mq: MessageQueue> SnapshotSynchronizer<Mq> {
topic: self.meta_topic.clone(),
})?;

info!(
debug!(
"Finished to sync snapshot to meta topic, topic:{}",
self.meta_topic
);
Expand Down