Skip to content

Commit

Permalink
Move blocking readPair call to boundedElastic thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Arooba-git committed Jul 24, 2023
1 parent aeb4710 commit dec0b5d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,16 @@ public Mono<MailboxCounters> getMailboxCountersReactive(Mailbox mailbox) {
}
return Mono.just(counters);
})
.doOnNext(counters -> readRepair(mailbox, counters));
.doOnNext(counters -> {
if (this.cassandraConfiguration.getMailboxReadRepair() > 0) {
Mono.fromRunnable(() -> {
readRepair(mailbox, counters);
})
.subscribeOn(Schedulers.boundedElastic())
.subscribe();
}
});

}

public Mono<MailboxCounters> readMailboxCounters(CassandraId mailboxId) {
Expand Down

0 comments on commit dec0b5d

Please sign in to comment.