The current implementation of EventsSubscription cannot work if there are gaps in globalOrder. Even though we can protect globalOrder sequence from gaps creation by using the EventLock table we can't secure the system from network partition. For example, consider a transaction that is running and has executed all statements but has not committed yet. Then if a network partition occurs between the database and the server, the transaction will abort, but the change made in globalOrder sequence will not rollback causing a gap.
Problem description
The current implementation of
EventsSubscription
cannot work if there are gaps inglobalOrder
. Even though we can protectglobalOrder
sequence from gaps creation by using theEventLock
table we can't secure the system from network partition. For example, consider a transaction that is running and has executed all statements but has not committed yet. Then if a network partition occurs between the database and the server, the transaction will abort, but the change made inglobalOrder
sequence will not rollback causing a gap.