[
https://issues.apache.org/jira/browse/SOLR-18612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Saric updated SOLR-18612:
------------------------------
Fix Version/s: main(11.0)
> Instantiate SimpleOrderedMap instead of NamedList where keys do not repeat
> (SIP-22 step 5)
> ------------------------------------------------------------------------------------------
>
> Key: SOLR-18612
> URL: https://issues.apache.org/jira/browse/SOLR-18612
> Project: Solr
> Issue Type: Improvement
> Components: search, SolrJ
> Reporter: Ivan Saric
> Priority: Major
> Fix For: main(11.0)
>
>
> This is step 5 of [SIP-22: NamedList
> Reduction|https://cwiki.apache.org/confluence/spaces/SOLR/pages/340036504/SIP-22+NamedList+Reduction]:
> {quote}Change NamedList instantiations to SimpleOrderedMap as appropriate;
> probably many places. This is Solr 10 only; it can affect backwards
> compatibility. One Jira & PR(s); don't combine with anything else.{quote}
> Step 4 (SOLR-18603) seals the hierarchy. As agreed on the dev list
> ([Follow-up work after
> SOLR-17600|https://lists.apache.org/thread/2o09q8yjmsx4l9b58mqqk5mgdbv7qf36]),
> "Solr 10" now means Solr 11 ({{main}}).
> h3. Scope
> * Instantiation sites only: {{new NamedList(...)}} becomes {{new
> SimpleOrderedMap(...)}} where the keys provably never repeat. On {{main}}
> today there are 217 such sites in main sources (75 files in {{solr/core}}, 13
> in {{solr/solrj}}, 7 across {{solrj-streaming}}, {{test-framework}},
> {{benchmark}} and {{solr/modules/*}}).
> * No public method signature changes (NamedList stays in signatures; that is
> SIP-22 step 7).
> * Tests are out of scope for the first pass (268 further sites in test
> sources).
> * Sites that rely on repeated keys stay {{NamedList}}: e.g. {{json.nl}}
> handling, facet structures, {{lst}} config parsing. Where that is not obvious
> from the code, the PR says why.
> * Excluded: {{SolrQueryResponse}} and the response header, which SOLR-18398
> migrates to {{LinkedHashMap}} closer to the 11.0 release.
> h3. Compatibility
> * JSON: {{JSONWriter}} writes a {{SimpleOrderedMap}} as a JSON object
> regardless of {{json.nl}}, while a {{NamedList}} follows {{json.nl}} (default
> {{flat}}). So changing a NamedList that reaches a response changes that part
> of the JSON output for clients not using {{json.nl=map}}. Such sites are
> handled deliberately and listed in the upgrade notes; this is the
> compatibility impact the SIP anticipates for this step.
> * javabin: a {{SimpleOrderedMap}} is written with its own tag and decoded by
> SolrJ as a {{SimpleOrderedMap}}, which is still a {{NamedList}}, so existing
> SolrJ casts keep working. Note that {{solr.solrj.javabin.readMapAsNamedList}}
> (SOLR-17635) still defaults to {{false}} on {{main}}.
> * Java serialization: SOLR-18196 reported {{ObjectOutputStream}} problems
> once {{SimpleOrderedMap}} implemented {{Map}}; tests were added in 10.1, the
> ticket is still open. More SimpleOrderedMap instances widen what that affects.
> h3. Deliverable
> One Jira, several PRs split by module so each is independently reviewable, as
> with SOLR-17600: {{solr/solrj}} first (smallest, most visible to clients),
> then {{solr/core}} (possibly split by package), then the remaining modules.
> Each PR carries its own changelog entry under this key, and the upgrade note
> is extended as JSON-visible sites are changed.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]