Skip to content

Commit

Permalink
Set transaction names in garbage collector (#2113)
Browse files Browse the repository at this point in the history
  • Loading branch information
divergentdave authored Oct 10, 2023
1 parent 4a3bb42 commit d66f887
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aggregator/src/aggregator/garbage_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ impl<C: Clock> GarbageCollector<C> {
// Retrieve tasks.
let tasks = self
.datastore
.run_tx(|tx| Box::pin(async move { tx.get_aggregator_tasks().await }))
.run_tx_with_name("garbage_collector_get_tasks", |tx| {
Box::pin(async move { tx.get_aggregator_tasks().await })
})
.await
.context("couldn't retrieve tasks")?;

Expand All @@ -55,7 +57,7 @@ impl<C: Clock> GarbageCollector<C> {

async fn gc_task(&self, task: Arc<AggregatorTask>) -> Result<()> {
self.datastore
.run_tx(|tx| {
.run_tx_with_name("garbage_collector", |tx| {
let task = Arc::clone(&task);
let report_limit = self.report_limit;
let aggregation_limit = self.aggregation_limit;
Expand Down

0 comments on commit d66f887

Please sign in to comment.