Skip to content

Commit 6a3958b

Browse files
committed
chore(tracing): drop duplicated inline tags
1 parent c2c914c commit 6a3958b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+370
-456
lines changed

src/query/ee/src/storages/fuse/operations/vacuum_table_v2.rs

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub async fn do_vacuum2(
9292
{
9393
if ctx.txn_mgr().lock().is_active() {
9494
info!(
95-
"[FUSE-VACUUM2] Transaction is active, skipping vacuum, target table {}",
95+
"Transaction is active, skipping vacuum, target table {}",
9696
table.get_table_info().desc
9797
);
9898
return Ok(vec![]);
@@ -103,7 +103,7 @@ pub async fn do_vacuum2(
103103

104104
let Some(latest_snapshot) = fuse_table.read_table_snapshot().await? else {
105105
info!(
106-
"[FUSE-VACUUM2] Table {} has no snapshot, stopping vacuum",
106+
"Table {} has no snapshot, stopping vacuum",
107107
fuse_table.get_table_info().desc
108108
);
109109
return Ok(vec![]);
@@ -119,10 +119,7 @@ pub async fn do_vacuum2(
119119

120120
let snapshots_before_lvt = match retention_policy {
121121
RetentionPolicy::ByTimePeriod(delta_duration) => {
122-
info!(
123-
"[FUSE-VACUUM2] Using ByTimePeriod policy {:?}",
124-
delta_duration
125-
);
122+
info!("Using ByTimePeriod policy {:?}", delta_duration);
126123
let retention_period = if fuse_table.is_transient() {
127124
// For transient table, keep no history data
128125
TimeDelta::zero()
@@ -144,7 +141,7 @@ pub async fn do_vacuum2(
144141
}
145142

146143
ctx.set_status_info(&format!(
147-
"[FUSE-VACUUM2] Set LVT for table {}, elapsed: {:?}, LVT: {:?}",
144+
"Set LVT for table {}, elapsed: {:?}, LVT: {:?}",
148145
fuse_table.get_table_info().desc,
149146
start.elapsed(),
150147
lvt
@@ -156,7 +153,7 @@ pub async fn do_vacuum2(
156153
}
157154
RetentionPolicy::ByNumOfSnapshotsToKeep(num_snapshots_to_keep) => {
158155
info!(
159-
"[FUSE-VACUUM2] Using ByNumOfSnapshotsToKeep policy {:?}",
156+
"Using ByNumOfSnapshotsToKeep policy {:?}",
160157
num_snapshots_to_keep
161158
);
162159
// List the snapshot order by timestamp asc, till the current snapshot(inclusively).
@@ -198,7 +195,7 @@ pub async fn do_vacuum2(
198195

199196
let elapsed = start.elapsed();
200197
ctx.set_status_info(&format!(
201-
"[FUSE-VACUUM2] Listed snapshots for table {}, elapsed: {:?}, snapshots_dir: {:?}, snapshots: {:?}",
198+
"Listed snapshots for table {}, elapsed: {:?}, snapshots_dir: {:?}, snapshots: {:?}",
202199
fuse_table.get_table_info().desc,
203200
elapsed,
204201
fuse_table
@@ -220,7 +217,7 @@ pub async fn do_vacuum2(
220217
return Ok(vec![]);
221218
};
222219
ctx.set_status_info(&format!(
223-
"[FUSE-VACUUM2] Selected gc_root for table {}, elapsed: {:?}, gc_root: {:?}, snapshots_to_gc: {:?}",
220+
"Selected gc_root for table {}, elapsed: {:?}, gc_root: {:?}, snapshots_to_gc: {:?}",
224221
fuse_table.get_table_info().desc,
225222
start.elapsed(),
226223
gc_root,
@@ -249,7 +246,7 @@ pub async fn do_vacuum2(
249246
.collect::<Vec<_>>();
250247

251248
ctx.set_status_info(&format!(
252-
"[FUSE-VACUUM2] Listed segments before gc_root for table {}, elapsed: {:?}, segment_dir: {:?}, gc_root_timestamp: {:?}, segments: {:?}",
249+
"Listed segments before gc_root for table {}, elapsed: {:?}, segment_dir: {:?}, gc_root_timestamp: {:?}, segments: {:?}",
253250
fuse_table.get_table_info().desc,
254251
start.elapsed(),
255252
fuse_table.meta_location_generator().segment_location_prefix(),
@@ -267,7 +264,7 @@ pub async fn do_vacuum2(
267264
.map(|v| TableMetaLocationGenerator::gen_segment_stats_location_from_segment_location(v))
268265
.collect::<Vec<_>>();
269266
ctx.set_status_info(&format!(
270-
"[FUSE-VACUUM2] Filtered segments_to_gc for table {}, elapsed: {:?}, segments_to_gc: {:?}, stats_to_gc: {:?}",
267+
"Filtered segments_to_gc for table {}, elapsed: {:?}, segments_to_gc: {:?}, stats_to_gc: {:?}",
271268
fuse_table.get_table_info().desc,
272269
start.elapsed(),
273270
slice_summary(&segments_to_gc),
@@ -285,7 +282,7 @@ pub async fn do_vacuum2(
285282
gc_root_blocks.extend(segment?.block_metas()?.iter().map(|b| b.location.0.clone()));
286283
}
287284
ctx.set_status_info(&format!(
288-
"[FUSE-VACUUM2] Read segments for table {}, elapsed: {:?}",
285+
"Read segments for table {}, elapsed: {:?}",
289286
fuse_table.get_table_info().desc,
290287
start.elapsed(),
291288
));
@@ -304,7 +301,7 @@ pub async fn do_vacuum2(
304301
.collect::<Vec<_>>();
305302

306303
ctx.set_status_info(&format!(
307-
"[FUSE-VACUUM2] Listed blocks before gc_root for table {}, elapsed: {:?}, block_dir: {:?}, gc_root_timestamp: {:?}, blocks: {:?}",
304+
"Listed blocks before gc_root for table {}, elapsed: {:?}, block_dir: {:?}, gc_root_timestamp: {:?}, blocks: {:?}",
308305
fuse_table.get_table_info().desc,
309306
start.elapsed(),
310307
fuse_table.meta_location_generator().block_location_prefix(),
@@ -318,7 +315,7 @@ pub async fn do_vacuum2(
318315
.filter(|b| !gc_root_blocks.contains(b))
319316
.collect();
320317
ctx.set_status_info(&format!(
321-
"[FUSE-VACUUM2] Filtered blocks_to_gc for table {}, elapsed: {:?}, blocks_to_gc: {:?}",
318+
"Filtered blocks_to_gc for table {}, elapsed: {:?}, blocks_to_gc: {:?}",
322319
fuse_table.get_table_info().desc,
323320
start.elapsed(),
324321
slice_summary(&blocks_to_gc)
@@ -358,7 +355,7 @@ pub async fn do_vacuum2(
358355
}
359356

360357
ctx.set_status_info(&format!(
361-
"[FUSE-VACUUM2] Collected indexes_to_gc for table {}, elapsed: {:?}, indexes_to_gc: {:?}",
358+
"Collected indexes_to_gc for table {}, elapsed: {:?}, indexes_to_gc: {:?}",
362359
fuse_table.get_table_info().desc,
363360
start.elapsed(),
364361
slice_summary(&indexes_to_gc)
@@ -402,7 +399,7 @@ pub async fn do_vacuum2(
402399
.chain(indexes_to_gc.into_iter())
403400
.collect();
404401
ctx.set_status_info(&format!(
405-
"[FUSE-VACUUM2] Removed files for table {}, elapsed: {:?}, files_to_gc: {:?}",
402+
"Removed files for table {}, elapsed: {:?}, files_to_gc: {:?}",
406403
fuse_table.get_table_info().desc,
407404
start.elapsed(),
408405
slice_summary(&files_to_gc)
@@ -453,7 +450,7 @@ async fn set_lvt(
453450
) -> Result<Option<DateTime<Utc>>> {
454451
if !is_uuid_v7(&latest_snapshot.snapshot_id) {
455452
info!(
456-
"[FUSE-VACUUM2] Latest snapshot is not v7, stopping vacuum: {:?}",
453+
"Latest snapshot is not v7, stopping vacuum: {:?}",
457454
latest_snapshot.snapshot_id
458455
);
459456
return Ok(None);
@@ -485,7 +482,7 @@ async fn list_until_prefix(
485482
need_one_more: bool,
486483
gc_root_meta_ts: Option<DateTime<Utc>>,
487484
) -> Result<Vec<Entry>> {
488-
info!("[FUSE-VACUUM2] Listing files until prefix: {}", until);
485+
info!("Listing files until prefix: {}", until);
489486
let dal = fuse_table.get_operator_ref();
490487

491488
match dal.info().scheme() {

src/query/pipeline/core/src/processors/processor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl ProcessorPtr {
178178
("error.message", err.display_text()),
179179
]
180180
});
181-
log::info!(error = err.to_string(); "[PIPELINE-EXECUTOR] Error in process");
181+
log::info!(error = err.to_string(); "Error in process");
182182
Err(err)
183183
}
184184
}
@@ -218,7 +218,7 @@ impl ProcessorPtr {
218218
("error.message", err.display_text()),
219219
]
220220
});
221-
log::info!(error = err.to_string(); "[PIPELINE-EXECUTOR] Error in process");
221+
log::info!(error = err.to_string(); "Error in process");
222222
Err(err)
223223
}
224224
}

src/query/pipeline/transforms/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#![feature(assert_matches)]
2222
#![feature(debug_closure_helpers)]
2323

24-
// Logs from this crate will show up as "[TRANSFORMS] ...".
24+
// Logs from this crate will show up as "...".
2525
databend_common_tracing::register_module_tag!("[TRANSFORMS]");
2626

2727
pub mod processors;

src/query/service/src/auth.rs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,15 @@ impl AuthMgr {
130130
token: t,
131131
client_ip,
132132
} => {
133-
let jwt_auth = self
134-
.jwt_auth
135-
.as_ref()
136-
.ok_or_else(|| ErrorCode::AuthenticateFailure("[AUTH] JWT authentication failed: JWT auth is not configured on this server"))?;
133+
let jwt_auth = self.jwt_auth.as_ref().ok_or_else(|| {
134+
ErrorCode::AuthenticateFailure(
135+
"JWT authentication failed: JWT auth is not configured on this server",
136+
)
137+
})?;
137138
let jwt = jwt_auth.parse_jwt_claims(t.as_str()).await?;
138139
let user_name = jwt.subject.ok_or_else(|| {
139140
ErrorCode::AuthenticateFailure(
140-
"[AUTH] JWT authentication failed: subject claim (user name) is missing in the token",
141+
"JWT authentication failed: subject claim (user name) is missing in the token",
141142
)
142143
})?;
143144

@@ -157,7 +158,7 @@ impl AuthMgr {
157158
{
158159
Ok(mut user_info) => {
159160
if user_info.auth_info != AuthInfo::JWT {
160-
return Err(ErrorCode::AuthenticateFailure("[AUTH] Authentication failed: user exists but is not configured for JWT authentication"));
161+
return Err(ErrorCode::AuthenticateFailure("Authentication failed: user exists but is not configured for JWT authentication"));
161162
}
162163
if let Some(ensure_user) = jwt.custom.ensure_user {
163164
let current_roles = user_info.grants.roles();
@@ -166,7 +167,7 @@ impl AuthMgr {
166167
for role in roles.iter() {
167168
if !current_roles.contains(role) {
168169
info!(
169-
"[AUTH] JWT grant role to user: {} -> {}",
170+
"JWT grant role to user: {} -> {}",
170171
user_info.name, role
171172
);
172173
user_api
@@ -185,7 +186,7 @@ impl AuthMgr {
185186
// grant default role to user if not exists
186187
if !current_roles.contains(jwt_default_role) {
187188
info!(
188-
"[AUTH] JWT grant default role to user: {} -> {}",
189+
"JWT grant default role to user: {} -> {}",
189190
user_info.name, jwt_default_role
190191
);
191192
user_api
@@ -200,7 +201,7 @@ impl AuthMgr {
200201
// ensure default role to jwt role
201202
if user_info.option.default_role() != Some(jwt_default_role) {
202203
info!(
203-
"[AUTH] JWT update default role for user: {} -> {}",
204+
"JWT update default role for user: {} -> {}",
204205
user_info.name, jwt_default_role
205206
);
206207
user_api
@@ -226,15 +227,15 @@ impl AuthMgr {
226227
}
227228
_ => {
228229
return Err(ErrorCode::AuthenticateFailure(format!(
229-
"[AUTH] Authentication failed: {}",
230+
"Authentication failed: {}",
230231
e.message()
231232
)))
232233
}
233234
}
234235
let ensure_user = jwt
235236
.custom
236237
.ensure_user
237-
.ok_or_else(|| ErrorCode::AuthenticateFailure(format!("[AUTH] JWT authentication failed: ensure_user claim is missing and user does not exist: {}", e.message())))?;
238+
.ok_or_else(|| ErrorCode::AuthenticateFailure(format!("JWT authentication failed: ensure_user claim is missing and user does not exist: {}", e.message())))?;
238239
// create a new user if not exists
239240
let mut user_info = UserInfo::new(&user_name, "%", AuthInfo::JWT);
240241
if let Some(ref roles) = ensure_user.roles {
@@ -250,7 +251,7 @@ impl AuthMgr {
250251
.option
251252
.set_default_role(Some(default_role.clone()));
252253
}
253-
info!("[AUTH] JWT create user: {}", user_info.name);
254+
info!("JWT create user: {}", user_info.name);
254255
user_api
255256
.add_user(&tenant, user_info.clone(), &CreateOption::CreateIfNotExists)
256257
.await?;
@@ -309,16 +310,16 @@ impl AuthMgr {
309310
hash_method: t,
310311
..
311312
} => match p {
312-
None => Err(ErrorCode::AuthenticateFailure("[AUTH] Authentication failed: password is required but was not provided")),
313+
None => Err(ErrorCode::AuthenticateFailure("Authentication failed: password is required but was not provided")),
313314
Some(p) => {
314315
if *h == t.hash(p) {
315316
Ok(())
316317
} else {
317-
Err(ErrorCode::AuthenticateFailure("[AUTH] Authentication failed: incorrect password"))
318+
Err(ErrorCode::AuthenticateFailure("Authentication failed: incorrect password"))
318319
}
319320
}
320321
},
321-
_ => Err(ErrorCode::AuthenticateFailure("[AUTH] Authentication failed: user exists but is not configured for password authentication")),
322+
_ => Err(ErrorCode::AuthenticateFailure("Authentication failed: user exists but is not configured for password authentication")),
322323
};
323324
UserApiProvider::instance()
324325
.update_user_login_result(tenant, identity, authed.is_ok(), &user)

src/query/service/src/history_tables/alter_table.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub async fn should_reset(
125125
// Internal -> External
126126
if current_storage_params.is_none() && connection.is_some() {
127127
info!(
128-
"[HISTORY-TABLES] Converting internal table to external table, current None vs new {:?}",
128+
"Converting internal table to external table, current None vs new {:?}",
129129
connection
130130
);
131131
return Ok(true);
@@ -134,7 +134,7 @@ pub async fn should_reset(
134134
// External -> Internal
135135
if current_storage_params.is_some() && connection.is_none() {
136136
info!(
137-
"[HISTORY-TABLES] Converting external table to internal table, current {:?} vs new None",
137+
"Converting external table to internal table, current {:?} vs new None",
138138
current_storage_params
139139
);
140140
return Ok(false);
@@ -156,11 +156,11 @@ pub async fn should_reset(
156156
// return error to prevent cyclic conversion
157157
if current_storage_params != Some(&new_storage_params) {
158158
info!(
159-
"[HISTORY-TABLES] Storage parameters have changed, current {:?} vs new {:?}",
159+
"Storage parameters have changed, current {:?} vs new {:?}",
160160
current_storage_params, new_storage_params
161161
);
162162
return Err(ErrorCode::InvalidConfig(
163-
"[HISTORY-TABLES] Cannot change storage parameters of external history table, please drop the tables and stage first."
163+
"Cannot change storage parameters of external history table, please drop the tables and stage first."
164164
));
165165
}
166166
}

0 commit comments

Comments
 (0)