Skip to content

SOLR-13696: Category and Dimensional routed-alias test suites run again, with a create-alias fix and a time-route fix - #5088

Open
nick-boss-tech wants to merge 10 commits into
apache:mainfrom
nick-boss-tech:solr-13696-submit
Open

nick-boss-tech wants to merge 10 commits into
apache:mainfrom
nick-boss-tech:solr-13696-submit

Conversation

@nick-boss-tech

@nick-boss-tech nick-boss-tech commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖 (posted on behalf of Nick Shanin)

https://issues.apache.org/jira/browse/SOLR-13696

What happens today

The Category and Dimensional routed-alias update tests are skipped. When the skip is removed, they fail in several places.

Both suites extend RoutedAliasUpdateProcessorTest, which was skipped for this ticket. When the skip is removed:

  • The create-alias message for a dimensional alias has no top-level router name or field. The Dimensional suite cannot create its alias.
  • The Dimensional tests use a fixed "future" date, 2020-10-23. That date is now in the past. The router then creates daily collections toward it until the client times out.
  • The final placement check reads [shard] in its default style. At luceneMatchVersion 9.5 that style returns a bare shard id. The id holds neither the category nor the day the check asserts.
  • A document whose timestamp is still a string at update-processor time throws ClassCastException in TimeRoutedAlias.formattedRouteValues. The create-alias failure stops the suite before it gets that far.
  • Each test method creates its own cluster, but only the last one is shut down. The earlier clusters leak and cause teardown failures.

What this change does

The two suites run again, their tests are repaired, and two production defects are fixed.

  • The @AwaitsFix on the base class is removed, so the Category and Dimensional suites run in normal mode. The base class keeps its @Ignore, since it is abstract (base class).
  • addDocsAndCommit commits each collection of the alias explicitly and no longer relies on commitWithin (commit loop).
  • Each test method shuts down its own cluster in an @After method (L72-L82).
  • The category test now uses ship_name_s instead of ship_name_en (L53).
  • The "future" document is built 30 days after the current time (helper). The placement check asks for [shard] in URL style (L282-L293).
  • Create-alias fix: for a dimensional alias, the message now carries the top-level router name, in the Dimensional[TIME,CATEGORY] form, and the comma-joined router field. That is the shape SolrJ already sends (CreateAlias, SolrJ). The change applies to every dimensional alias created through the create-alias API, not only in tests. CreateAliasAPITest now expects 12 entries, up from 10, and checks both new keys (L308-L311).
  • Time-route fix: formattedRouteValues parses the value with parseRouteKey instead of casting it to Date (L219-L225, parseRouteKey). A string timestamp is now parsed. Only dimensional aliases call this method (caller).

Proof

The focused suites pass at head da4fa6df11784ce5a83bc7e74ec7b6aa78f689b9, and each repair fails without its fix.

  • CategoryRoutedAliasUpdateProcessorTest 6 of 6.
  • DimensionalRoutedAliasUpdateProcessorTest 2 of 2.
  • CreateAliasAPITest 13 of 13.
  • The module checks pass.

Each repair was also run without its fix:

  • Time-route fix: the run on the production code before this fix, at 98ad9d3fcc33, fails.
  • Future-date repair: the run on the test file before this repair, at a4e0da422327, fails.
  • The [shard] repair: the run on the test file before this repair, at 08f9384e47c0, fails.
  • Create-alias fix: the run on base c3cdf7b46e8 fails both Dimensional tests at CREATEALIAS.

A choice to check

The create-alias fix rides along with the test repair. It could move to its own ticket and PR.

The create-alias message. Options considered:

  • Implemented: the fix stays in this branch. The Dimensional suite needs it to create its alias.
  • Alternative: a separate ticket and PR. The Dimensional suite stays broken until that PR lands.

Was keeping the create-alias fix in this branch the right call?

Limits

This change adds no Time coverage, and the routed-alias tests no longer use commitWithin.

  • TimeRoutedAliasUpdateProcessorTest keeps its own @AwaitsFix(SOLR-13059) (L75) and stays skipped. No Time coverage comes from this change. One more method in that class, testDateMathInStart, is skipped under SOLR-13943 (L966), which is separate work.
  • Every document is committed explicitly, so commitWithin is no longer exercised. A follow-up submission to restore that coverage is planned.
  • Only the Dimensional suite reaches the time-route change, through its time dimension. Its documents send the timestamp as a string (newDoc). A single time alias does not call this method, so the change has no effect there.

Changelog: changelog/unreleased/SOLR-13696-dimensional-routed-alias.yml (type fixed), one entry covering both production fixes.

AI assistance

AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.

….addDocsAndCommit and re-enable the test

Hypothetical, unrun regression test; see SOLR-13696-TESTING.md.
…defines

Category tests used ship_name_en, which the server _default configset never defines, so
autoCreateFields=false rejects every document. Use the string dynamic field ship_name_s.

The explicit commit now fails with a clear message if the alias is not listed, instead of a
null dereference.
@nick-boss-tech
nick-boss-tech marked this pull request as ready for review October 9, 2026 23:26
@nick-boss-tech nick-boss-tech changed the title SOLR-13696: DimensionalRoutedAliasUpdateProcessorTest / RoutedAliasUpdateProcessorTest failures due commitWithin/openSearcher delays SOLR-13696: Category and Dimensional routed-alias test suites run again, with a create-alias fix and a time-route fix Oct 9, 2026
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