sjdonado / openchargemap-sync

GraphQL + MongoDB + RabbitMQ + Docker - no frameworks :)
0 stars 0 forks source link

Feat/#1 scraper service mongo replica cluster #7

Closed sjdonado closed 1 year ago

sjdonado commented 1 year ago

Messages are processed almost simultaneously. When repository.collections.poiListSnapshots.findOne is called, the latest changes are not reflected, leading to inconsistencies when calculating isCompleted and poiList.

To solve the race conditions problems, interactions with the database are done through transactions. Mongo requires a replica set since version 4 to enable this feature.

Summary

Future work