Skip to content

Commit b7f4cd8

Browse files
authored
chore(meta): adjust the log level of some semaphore from info to debug (#18367)
* chore(meta): remove useless code for semaphore * chore(meta): remove useless code for semaphore * chore(meta): adjust the log level of some semaphore from info to debug * chore(meta): adjust the log level of some semaphore from info to debug
1 parent a8d3e9f commit b7f4cd8

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/meta/semaphore/src/acquirer/acquirer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ impl Acquirer {
397397
// Extend the lease only if the entry still exists. If the entry has been removed,
398398
// it means the semaphore has been released. Re-inserting it would cause confusion
399399
// in the semaphore state and potentially lead to inconsistent behavior.
400-
info!(
400+
log::debug!(
401401
"{}: About to extend semaphore permit lease: {} ttl: {:?}",
402402
ctx, key_str, ttl
403403
);

src/meta/semaphore/src/meta_event_subscriber/processor.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use codeq::Decode;
1616
use databend_common_meta_types::protobuf::WatchResponse;
1717
use databend_common_meta_types::SeqV;
18-
use log::info;
1918
use log::warn;
2019
use tokio::sync::mpsc;
2120

@@ -75,11 +74,13 @@ impl Processor {
7574
prev: Option<SeqV<PermitEntry>>,
7675
current: Option<SeqV<PermitEntry>>,
7776
) -> Result<(), ConnectionClosed> {
78-
info!(
77+
log::debug!(
7978
"{} processing kv change: {}: {:?} -> {:?}",
80-
self.ctx, sem_key, prev, current
79+
self.ctx,
80+
sem_key,
81+
prev,
82+
current
8183
);
82-
8384
// Update local queue to update the acquired/released state.
8485
let state_changes = match (prev, current) {
8586
(None, Some(entry)) => self.queue.insert(sem_key.seq, entry.data),
@@ -95,10 +96,10 @@ impl Processor {
9596
}
9697
};
9798

98-
info!("{} queue state: {}", self.ctx, self.queue);
99+
log::debug!("{} queue state: {}", self.ctx, self.queue);
99100

100101
for event in state_changes {
101-
info!("{} sending event: {}", self.ctx, event);
102+
log::debug!("{} sending event: {}", self.ctx, event);
102103

103104
self.tx.send(event).await.map_err(|e| {
104105
ConnectionClosed::new_str(format!("Semaphore-Watcher fail to send {}", e.0))

src/meta/semaphore/src/meta_event_subscriber/subscriber.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl MetaEventSubscriber {
124124

125125
match &watch_result {
126126
Ok(t) => {
127-
info!(
127+
log::debug!(
128128
"{} received event from watch-stream: Ok({})",
129129
self.ctx,
130130
t.display()

0 commit comments

Comments
 (0)