Repository navigation
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 16 commits into
Open
nick-boss-tech wants to merge 16 commits into
nick-boss-tech wants to merge 16 commits into
Conversation
….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.
…alias message for dimensional aliases
…lues instead of casting it to Date
…to now in the dimensional routed alias test
…l routed alias placement check
nick-boss-tech
marked this pull request as ready for review
October 9, 2026 23:26
…ing it mid-creation
…unt, and remove the class-level skip
…instead of dropping it
…the literal myalias
…constant in the 11-03 check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 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.
Both suites extend
RoutedAliasUpdateProcessorTest, which is skipped for this ticket. Un-skipping shows five problems:[shard]in its default style, which returns a bare shard id at luceneMatchVersion 9.5.ClassCastExceptioninTimeRoutedAlias.formattedRouteValues.What this change does
The two suites run again, their tests are repaired, and two production defects are fixed.
@AwaitsFixon the base class is removed. The base keeps its@Ignore, since it is abstract.addDocsAndCommitcommits each collection explicitly instead of using commitWithin.@After.ship_name_s. The "future" document is built 30 days after now, and the placement check asks for[shard]in URL style.Dimensional[TIME,CATEGORY]form) and the comma-joined router field, the shape SolrJ already sends.formattedRouteValuesparses the value withparseRouteKeyinstead of casting it toDate. Only dimensional aliases call it.Proof
The focused suites pass at head
960355fce3, and each repair fails without its fix.The counts below were measured at
da4fa6df11, before the SOLR-13059 test fixes. At6914eae1c2the other routed-alias suites passed in normal mode.960355fce3changes only the TimeRouted test file and a test-only hook in production (see Choices), and the TimeRouted class passes in normal mode. Receipt:receipts/SOLR-13059.mdon coordination.CategoryRoutedAliasUpdateProcessorTest6 of 6,DimensionalRoutedAliasUpdateProcessorTest2 of 2,CreateAliasAPITest13 of 13. Module checks pass.98ad9d3fcc, the future-date and[shard]repairs ata4e0da4223and08f9384e47, and the create-alias fix on basec3cdf7b46e(both Dimensional tests fail at CREATEALIAS).Behavior change
Two requests that fail on main now succeed. Both paths are reached only by dimensional aliases.
formattedRouteValuesaccepts ISO-8601 strings throughparseRouteKey.InstantandDatevalues behave as before. A string that is not ISO-8601 now fails in the parser instead of withClassCastException.Choices for maintainers
Two decisions need a maintainer's call.
Should the V2 create-alias API accept dimensional aliases? This PR: yes, in the SolrJ shape. Alternative: keep rejecting them, and the Dimensional fixture creates its alias another way.
Should a time-routed document with a string timestamp be parsed or rejected? This PR: parse it as ISO-8601, with the parser the class already uses on another path. Alternative: return a 400 that names the field.
Should preemptive creation have a test hold, so the test can prove that creation is asynchronous? This PR: yes, one hook.
TestInjectiongets a latch that is null unless a test arms it, andRoutedAlias.preemptiveAsyncwaits on it (bounded at 30 seconds) before creating. In production the hook does nothing. Alternative: keep the timing-based check, which cannot tell synchronous creation from asynchronous creation.Our recommendation: the choices in this PR for all three. Choice 1 matches the SolrJ create path, choice 2 reuses the existing parser, and choice 3 is the only way the test can prove asynchrony without timing.
Limits
TimeRoutedAliasUpdateProcessorTestis no longer class-skipped for SOLR-13059.testDateMathInStartkeeps its method-level@AwaitsFix(SOLR-13943), which PR 5089 handles.Changelog:
changelog/unreleased/SOLR-13696-dimensional-routed-alias.yml(typefixed), 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.