minjibir commented on PR #489: URL: https://github.com/apache/pekko-persistence-r2dbc/pull/489#issuecomment-5648414114
I applied the cleanups from #491 in b5877fa (adapted from 05b866d, de02e893, e86ae5ac): the WriteFinished/deserializeRow reuse, the Done completion, the flush timer cancel, the collection cleanups, the MultiPluginSpec block removal, and the docs warning block and bisection correction. I also took the one-line JournalDao.writeEvents comment fix, since that comment is now wrong either way. I did not take two parts. writeEventsReturningTimestamps and the row-count check: the acceptance basis in #471 was that this plugin stays additive and touches no core journal file, so akka-persistence-r2dbc syncs stay conflict-free. The check needs a new JournalDao method, so I will raise it as a separate PR. Unconditional flush-on-completion: my design is "flush when max-batch-size is reached or when max-batch-time expires". The saturation re-flush in FlushDone is the second half of the capacity trigger, not a latency variant: when the threshold is crossed mid-flush, flushing on completion is what keeps batches back to back under sustained load. Below saturation, the window timer still paces batches, so #471's crossover measurements, which assume window-based coalescing, still hold. The unconditional queue.nonEmpty flush from 05b866d drops that pacing: sustained moderate load degenerates to one write per statement with the full queueing machinery around it. The actual latency bound is one flush plus max-batch-time, which I documented in the Tradeoffs section. If you want the always-immediate variant, I would add it as a separate opt-in setting after a perf-spec comparison. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
