Skip to content

HDDS-17596. Test OM read-path datanode sorting through KeyManager#listStatus - #11850

Open
rajeshkumarchandolu wants to merge 1 commit into
apache:masterfrom
rajeshkumarchandolu:om-sort-datanodes-listStatus
Open

rajeshkumarchandolu wants to merge 1 commit into
apache:masterfrom
rajeshkumarchandolu:om-sort-datanodes-listStatus

Conversation

@rajeshkumarchandolu

@rajeshkumarchandolu rajeshkumarchandolu commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • TestOMSortDatanodes read-path sorting tests now go through KeyManager#listStatus with sortDatanodesInPipeline enabled, instead of calling KeyManagerImpl#sortDatanodes(List, String) directly. This also covers the pipeline refresh from SCM before sorting.
  • KeyManagerImpl#sortDatanodes(List, String) is now private. It was public only for this test.

These changes are needed for the tracing proxies in OM (HDDS-17586). The key manager will be created as a tracing proxy, so that every key manager call gets its own span:

keyManager = TracingUtil.createProxy(new KeyManagerImpl(...), KeyManager.class, SpanKind.INTERNAL);

A tracing proxy implements only the KeyManager interface, so a test can't reach methods that exist only on KeyManagerImpl. Instead of adding the sorting helper to the interface just for a test, the test now uses the public read API. This PR doesn't add any tracing itself, and there is no functional change.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-17596

How was this patch tested?

@github-actions github-actions Bot added the om label Oct 29, 2026
@priyeshkaratha

Copy link
Copy Markdown
Member

Hi @rajeshkumarchandolu Please raise PR with proper Jira and follow the guidline

@priyeshkaratha
priyeshkaratha marked this pull request as draft October 30, 2026 05:05
@rajeshkumarchandolu rajeshkumarchandolu changed the title Test OM read-path datanode sorting through KeyManager#listStatus HDDS-17596. Test OM read-path datanode sorting through KeyManager#listStatus Oct 30, 2026
@rajeshkumarchandolu
rajeshkumarchandolu force-pushed the om-sort-datanodes-listStatus branch from 8a9d98d to 67606c5 Compare October 30, 2026 09:30
@rajeshkumarchandolu
rajeshkumarchandolu marked this pull request as ready for review November 3, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants