You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A follow-up to #117: When two web requests try to resolve the same topic's relationships or references at the same time, both attempt to wire up the results to the same shared in-memory topic, including the other topic's IncomingRelationships list, which can corrupt that shared state or throw an exception. This closes that race with a lock, scoped narrowly enough to avoid deadlocking on the batch-load work (e.g., #127).
Tasks
Add a unit test that triggers the race (i.e., two concurrent reads resolving the same relationships)
Wrap the wire-up steps in CachedTopicRepository under the existing cache-wide lock
The batch-load step itself stays unlocked, since locking it could deadlock for bidirectional references
Confirm un-cached repositories (TopicRepository, SqlTopicRepository) are unaffected (they shouldn't be)
Activity