Skip to content

As a node operator, I want export-dd to support namespace filtering and pagination #82

Description

@jordanpadams

👤 User Story

As a node operator, I want export-dd to support namespace filtering and correct pagination so that I can export and inspect only the LDD entries for a specific namespace, and reliably export all entries when the total count exceeds the batch size.

💪 Motivation

export-dd currently:

  1. Accepts a -ns <namespace> flag but silently ignores it — all documents are exported regardless
  2. Uses a placeholder searchAfter = "" for pagination (marked FIXME in DataExporter.java:79) instead of extracting the last sort value from each response batch — meaning export silently stops at the first batch (~100 docs) when more exist

This makes export-dd unreliable as a diagnostic tool for inspecting what LDD field definitions are present in a registry node's -dd index.

📋 Requirements

  • export-dd -ns <namespace> should filter results to only documents belonging to the given namespace (i.e. where attr_ns matches)
  • export-dd without -ns should export all documents, correctly paginating through all batches using search_after
  • export-dd with -ns should also paginate correctly if a namespace has more than BATCH_SIZE entries

🩺 Additional context

  • DataExporter.export() in registry-mgr has a FIXME comment on the searchAfter assignment: searchAfter = ""; // FIXME: needs to be the last ID from the batch()
  • Response.Search interface has no method to retrieve the last sort value from a response — one needs to be added
  • The AWS SearchRespWrap and ES SearchRespImpl both need to implement the new method
  • The -ns filter should be passed through DDDataExporter.createRequest()SearchImpl.all() using the existing all(filterField, filterValue, sortField, size, searchAfter) overload, filtering on attr_ns

🦄 Related requirements


For Internal Dev Team To Complete

⚙️ Engineering Details

🎉 Integration & Test

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions