CodersCrew / coderscamp

Monorepo containing CodersCamp's internal application, its website, and all development resources created around them.
https://www.coderscamp.edu.pl/
GNU General Public License v3.0
6 stars 3 forks source link

[EventsSubscription] should handle gaps in globalOrder #374

Closed hkawalek closed 2 years ago

hkawalek commented 2 years ago

Problem description

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.

github-actions[bot] commented 2 years ago

Branch issue-374-_EventsSubscription_should_handle_gaps_in_globalOrder created!