phlask / phlask-map

Code behind the Phlask Web Map
https://beta.phlask.me
34 stars 36 forks source link

[Issue 419] address firebase concurrency concerns #438

Closed patrickcbrady closed 5 months ago

patrickcbrady commented 6 months ago

Pull Request

Change Summary

Use automatic id generation in firebase to ensure that identifiers from multiple instances writing simultaneously will not overlap.

Change Reason

Individual instances currently manually increment an identifier and send it directly, creating a race condition in the case where two instances write new entities close in time.

Verification [Optional]

Adding entries to existing DB

Screenshot 2024-06-05 at 6 35 04 AM

Adding entry to empty DB

Screenshot 2024-06-05 at 6 42 34 AM