Skip to content

Commit

Permalink
Fix hive may return same files
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Oct 25, 2024
1 parent 3c54434 commit 8301704
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/common/tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ logforth = { version = "0.12", features = [
'rolling_file',
'opentelemetry',
'fastrace',
"env-filter",
] }
opentelemetry = { workspace = true }
opentelemetry-otlp = { workspace = true }
Expand Down
6 changes: 5 additions & 1 deletion src/common/tracing/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ use databend_common_base::runtime::Thread;
use fastrace::prelude::*;
use log::LevelFilter;
use log::Metadata;
use logforth::filter::env::EnvFilterBuilder;
use logforth::filter::CustomFilter;
use logforth::filter::EnvFilter;
use logforth::filter::FilterResult;
use logforth::filter::TargetFilter;
use logforth::Dispatch;
Expand Down Expand Up @@ -213,7 +215,9 @@ pub fn init_logging(
"databend::log::structlog",
LevelFilter::Off,
))
.filter(cfg.stderr.level.parse().unwrap_or(LevelFilter::Info))
.filter(EnvFilter::new(
EnvFilterBuilder::new().parse(&cfg.stderr.level),
))
.layout(get_layout(&cfg.stderr.format))
.append(logforth::append::Stderr);
logger = logger.dispatch(dispatch);
Expand Down
2 changes: 1 addition & 1 deletion src/query/storages/hive/hive/src/hive_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ async fn do_list_files_from_dir(
continue;
}
// Ignore the location itself
if path.trim_end_matches('/') == location.trim_end_matches('/') {
if path.trim_matches('/') == location.trim_matches('/') {
continue;
}

Expand Down

0 comments on commit 8301704

Please sign in to comment.