Datastore: `system_time` should be a critical section
ecpullen opened this issue · comments
Ethan Pullen commented
The current implementation of Datastore
and system_time
are open to several race conditions when reading targets from many threads. To ensure that each timestamp written to latest_known_time.json
is read, the entire process of calculating and writing the latest known time should be completed under a RwLock on the datastore.