Skip to content
Draft
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
25 changes: 13 additions & 12 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
let server = config.liquid_cache.server_address.as_ref().ok_or_else(|| {
anyhow::anyhow!("liquid cache enabled but server_address not set")
})?;
info!("Enabling liquid cache with server: {}", server);
info!(server = %server, "Enabling liquid cache");
builder = builder.liquid_cache_server(server.clone());
}

Expand Down Expand Up @@ -477,7 +477,7 @@
let cache_prefix = self.storage.cache_prefix(connection_id);

if let Err(e) = self.storage.delete_prefix(&cache_prefix).await {
warn!("Failed to delete cache prefix {}: {}", cache_prefix, e);
warn!(prefix = %cache_prefix, error = %e, "Failed to delete cache prefix");
}

Ok(())
Expand All @@ -488,7 +488,7 @@
// Delete versioned cache directory if it exists
if let Some(parquet_path) = &table_info.parquet_path {
if let Err(e) = self.storage.delete_prefix(parquet_path).await {
warn!("Failed to delete cache directory {}: {}", parquet_path, e);
warn!(path = %parquet_path, error = %e, "Failed to delete cache directory");
}
}

Expand Down Expand Up @@ -543,7 +543,7 @@
// via the async ConnectionsCatalogList. No pre-registration with DataFusion needed.

tracing::Span::current().record("runtimedb.connection_id", &connection_id);
info!("Connection '{}' registered (discovery pending)", name);
info!(connection = %name, id = %connection_id, "Connection registered (discovery pending)");

Ok(connection_id)
}
Expand Down Expand Up @@ -616,7 +616,7 @@
)
)]
pub async fn execute_query(&self, sql: &str) -> Result<QueryResponse> {
info!("Executing query: {}", sql);
info!(sql = %sql, "Executing query");
let start = Instant::now();
if crate::telemetry::include_sql_in_traces() {
tracing::Span::current().record("runtimedb.sql", sql);
Expand All @@ -627,15 +627,15 @@
// Step 1: Parse SQL into a statement
let dialect = session_state.config().options().sql_parser.dialect;
let statement = session_state.sql_to_statement(sql, &dialect).map_err(|e| {
error!("SQL parse error: {}", e);
error!(error = %e, "SQL parse error");
e
})?;

// Step 2: Extract table references from the parsed SQL
let references = session_state
.resolve_table_references(&statement)
.map_err(|e| {
error!("Failed to resolve table references: {}", e);
error!(error = %e, "Failed to resolve table references");
e
})?;

Expand All @@ -649,7 +649,7 @@
.instrument(tracing::info_span!("resolve_catalogs"))
.await
.map_err(|e| {
error!("Failed to resolve catalogs: {}", e);
error!(error = %e, "Failed to resolve catalogs");
e
})?;

Expand All @@ -666,7 +666,7 @@
.instrument(tracing::info_span!("statement_to_plan"))
.await
.map_err(|e| {
error!("Planning error: {}", e);
error!(error = %e, "Planning error");
e
})?;

Expand All @@ -676,7 +676,7 @@
// Execute physical plan and collect results
let results = async {
let results = df.collect().await.map_err(|e| {
error!("Error getting query result: {}", e);
error!(error = %e, "Error getting query result");
e
})?;
tracing::Span::current().record("runtimedb.batches_collected", results.len());
Expand All @@ -688,7 +688,7 @@
))
.await?;

info!("Execution completed in {:?}", start.elapsed());
info!(elapsed = ?start.elapsed(), "Execution completed");

let row_count: usize = results.iter().map(|b| b.num_rows()).sum();
tracing::Span::current().record("runtimedb.rows_returned", row_count);
Expand Down Expand Up @@ -2997,10 +2997,11 @@
let df_ctx = {
// Get actual object stores for instrumentation (preserves full config like MinIO path-style)
let object_stores: Vec<_> = storage.get_object_store().into_iter().collect();

Check warning on line 3000 in src/engine.rs

View workflow job for this annotation

GitHub Actions / Format

Diff in /home/runner/work/runtimedb/runtimedb/src/engine.rs
// Build liquid-cache config if server is configured
let liquid_cache_config = self.liquid_cache_server.map(|server| {
let store_configs: Vec<_> = storage.get_object_store_config().into_iter().collect();
let store_configs: Vec<_> =
storage.get_object_store_config().into_iter().collect();
(server, store_configs)
});

Expand Down
Loading