PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/System Design/Atlassian

Ensure thread-safe updates to org hierarchy

Last updated: Mar 29, 2026

Quick Overview

This question evaluates concurrent system and API design skills, focusing on thread-safety, atomic updates, consistency models, durability, deadlock avoidance, and testing of in-memory hierarchical user/group data structures.

  • hard
  • Atlassian
  • System Design
  • Software Engineer

Ensure thread-safe updates to org hierarchy

Company: Atlassian

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Technical Screen

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).

Quick Answer: This question evaluates concurrent system and API design skills, focusing on thread-safety, atomic updates, consistency models, durability, deadlock avoidance, and testing of in-memory hierarchical user/group data structures.

Related Interview Questions

  • Design a distributed rate limiter service - Atlassian (medium)
  • Design a simple greeting-card web app - Atlassian (medium)
  • Design a Data Stream Processor - Atlassian (easy)
  • Design a scalable chatbot platform - Atlassian (medium)
  • Diagnose why a scaled system became slow - Atlassian (medium)
Atlassian logo
Atlassian
Jul 31, 2025, 12:00 AM
Software Engineer
Technical Screen
System Design
4
0

Thread-safe Organization Hierarchy: API, Concurrency, and Consistency

Context

You are building an in-memory organization directory that manages groups (hierarchical) and users. Multiple threads will concurrently read and mutate the hierarchy. The workload is read-heavy with periodic updates.

Assume:

  • Groups form a tree (or forest) identified by stable IDs; groups can have child groups.
  • Users have unique IDs and can be members of multiple groups.
  • The service runs in a single process but must be crash-safe via durable storage.

Task

Design thread-safe add/remove operations for users and groups.

  1. Propose a minimal API for:
    • Creating/deleting users and groups
    • Adding/removing a user to/from a group
    • Moving a group under a new parent
    • Querying users, groups, and memberships
  2. Propose a concurrency strategy (e.g., reader–writer locks, fine-grained locking with lock ordering, immutable snapshots with copy-on-write, or MVCC/RCU). Specify:
    • How writes occur atomically
    • How readers are isolated from in-progress writes
    • Deadlock avoidance strategy (if using locks)
  3. Consistency guarantees:
    • How to guarantee linearizable writes (or at least read-consistent snapshots) while updates occur
    • How to serve long-running reads without blocking writers
  4. Discuss:
    • Contention hot spots and performance trade-offs of your approach
    • Failure recovery (durability model, recovery steps)
    • How to test concurrency correctness (stress tests, race detection, linearizability/snapshot checks)

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Atlassian•More Software Engineer•Atlassian Software Engineer•Atlassian System Design•Software Engineer System Design
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.