As Devil's Advocate, isn't it the current behavior that an exception
encountered in send() will result in the buffer *not* being cleared?
--
Eric Evans
john.er...@gmail.com
Yeah, that sound about right.
A typical use case for batch ops is as an async Actor:
* Create batch mutator. Keep it around as a long-lived object.
* Continuously feed/send it updates.
* Periodically, as the buffer overflows, ops will be sent "automatically".
To enable replay, wouldn't it be simplest just to do something like:
* On send, do NOT clear immediately, but set a flag marking the
buffer as done *before doing the (presumably failing) batch_mutate*.
* On (the next) update, check the flag - and if set clear the buffer
before proceeding.
This will allow for replay/resend on error. Just call 'send' on the
mutator again, before doing additional updates.
I suppose one might even add some sort of automatic retry strategy I
suppose, but I don't think that particular hammer belongs in the API.
/d