Closed pmwkaa closed 1 month ago
I think it is not so hard to implement. The main problem is where which flag should be provided by the user.
box.commit({is_async=true})
) than to the whole wal. It is more explicit and will not change the behavior of implicit transactions.
With the new architecture of WAL writer, it's way more feasible to implement asynchronous write mode: when clients don't wait for writes to disk. Some of the vendors even pride themselves in this mode (MemSQL), and generally this technique seems to be commonplace on the market (Redis).
If only for one reason, we need this mode to win in the last remaining benchmarks where we may not show off as well as we can.
How to do it:
When this flag is set, allocate struct wal_request on one of two rotating regions, not on fiber->gc, and set it a different route. The route return function should decrement region reference counter, and when the region has no references, it can be garbage collected become available for reuse.