Skip to content

Conversation

@jtuglu1
Copy link
Contributor

@jtuglu1 jtuglu1 commented Dec 22, 2025

Description

I've noticed that under heavy segment add/drop load (100s of data nodes, millions of segments), Broker callbacks and query threads can contend for the same global lock in the server view. It's not significant portion of query time, but given:

  • Queries (read path) occur much more frequently than segment callbacks (write path)
  • It's a relatively simple change

switching from an Object lock to a RW lock seemed logical. From benchmarks, this appears to save on the order of XX-XXXus per query in high contention scenarios.

Release note


Key changed/added classes in this PR
  • MyFoo
  • OurBar
  • TheirBaz

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@jtuglu1 jtuglu1 force-pushed the broker-serverview-perf branch from e60ba9c to a623a7b Compare December 22, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant