raventid / es-airline-app

Example application for selling airline tickets, based on SOA
MIT License
0 stars 2 forks source link

Possible race condition in BookTicket #6

Open raventid opened 5 years ago

raventid commented 5 years ago

Inspection with evt-pg-print-messages shows that after a clean run we have two terminating events, triggered by different FoundOneOf... events. Check it.

raventid commented 5 years ago

Yep, race condition. The solution is to add additional protection to an event handler. Rule of thumb for now (expect this to change) is to use every event from service in its own projection. Example protection is in coordination service like BookTicket