Skip to content

Commit c498677

Browse files
committed
add logs
1 parent 0e5d3e6 commit c498677

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/iceberg/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ serde_repr = { workspace = true }
8585
serde_with = { workspace = true }
8686
strum = { workspace = true, features = ["derive"] }
8787
tokio = { workspace = true, optional = false, features = ["sync"] }
88+
log = { workspace = true }
8889
typed-builder = { workspace = true }
8990
typetag = { workspace = true }
9091
url = { workspace = true }

crates/iceberg/src/transaction/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ impl Transaction {
175175
let backoff = Self::build_backoff(table_props)?;
176176
let tx = self;
177177

178+
let table_ident = tx.table.identifier().clone();
179+
180+
log::info!("Starting transaction commit for {}", table_ident.clone());
178181
(|mut tx: Transaction| async {
179182
let result = tx.do_commit(catalog).await;
180183
(tx, result)
@@ -183,6 +186,14 @@ impl Transaction {
183186
.sleep(tokio::time::sleep)
184187
.context(tx)
185188
.when(|e| e.retryable())
189+
.notify(move |err, dur| {
190+
log::warn!(
191+
"Transaction commit for {} failed with retryable error, retrying in {:?}: {}",
192+
table_ident,
193+
dur,
194+
err
195+
);
196+
})
186197
.await
187198
.1
188199
}

0 commit comments

Comments
 (0)