Skip to content

Commit

Permalink
fixup implement in memory cache on transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonThormeyer committed Oct 21, 2024
1 parent 95ec6f5 commit becf413
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions keystore/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,11 @@ macro_rules! commit_transaction {
tables.push(<$entity>::COLLECTION_NAME);
}
)*
if tables.is_empty() {
// If we didn't do this early return, creating the transaction would fail.
// Once logging is available, we should log a warning here though. (WPB-11743)
return Ok(());
}
let tx = conn.new_transaction(&tables).await?;
} else {
let tx = conn.new_transaction().await?;
Expand Down

0 comments on commit becf413

Please sign in to comment.