STICKY_EVENTS optimization for the cloud
pierre opened this issue · 0 comments
pierre commented
To make #29 work with the STICKY_EVENTS
configuration (bus only), we also need to review the behavior of finding orphan entries.
Instead of simply logging:
we now need to re-insert such orphan ids
in the in-memory inflightEvents
queue.
Looking at the code written for STICKY_POLLING
, there is an easier approach to this:
- Keep the orphan code as-is
- In the
reapEntries
method, instead of simply callingtransactional.insertEntries
, do something similar toinsertEntryFromTransaction
, i.e. write the entries to disk and add them to the inflight queue in bulk on success. Because of theLAST_INSERT_ID
logic, we wouldn't be able to insert them in bulk in that case though
For testing:
- Additional tests to write in
TestDBBackedQueue
- Manual testing: you could have one Kill Bill server running in
STICKY_EVENTS
and insert a dummy bus event entry for another fictive node (other creator name). That event should eventually be picked up by the server