Ensure thread-safe updates to org hierarchy
AtlassianSoftware Engineer · Technical ScreenLast updated
Ensure thread-safe updates to org hierarchy evaluates requirements, scale assumptions, API/data design, architecture, trade-offs, failure modes, and rollout in a realistic interview setting. A strong answer states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
For the aforementioned organization hierarchy, design thread-safe add/remove operations for users and groups. Propose an API and concurrency strategy (e.g., reader–writer locks, fine-grained locking, lock ordering to avoid deadlocks, or immutable snapshots with copy-on-write). Explain how to guarantee linearizable or at least read-consistent queries while updates occur, and how to handle long-running reads. Discuss contention hot spots, performance trade-offs, failure recovery, and how to test concurrency correctness (stress tests, race detection).
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.