isaric opened a new pull request, #5336:
URL: https://github.com/apache/solr/pull/5336

   https://issues.apache.org/jira/browse/SOLR-18612
   
   # Description
   
   SIP-22 step 5, third slice (after #5311 for SolrJ and #5326 for core plugin 
init args). This one covers the Collections API, backup/snapshot and 
replication sites in `solr/core` where a `NamedList` is built with keys that 
never repeat: 14 sites in 10 files.
   
   Unlike the two earlier slices, part of this is user-visible. `JSONWriter` 
renders a `NamedList` according to `json.nl` (flat by default) but always 
renders a `SimpleOrderedMap` as a JSON object, so five response sections change 
shape for clients that use the default `json.nl`. They are listed in a new 
"Response Format" section of the Solr 11 upgrade notes and in the changelog 
entry, and the `OVERSEERSTATUS` example in the ref guide is updated. Clients 
using `json.nl=map`, XML or SolrJ see no change.
   
   # Solution
   
   Response-visible, each section keyed by something unique (operation name, 
snapshot name, core name, or fixed field names):
   
   - `OverseerStatusCmd`: `overseer_operations` and `collection_operations`
   - `CollectionsHandler` LISTSNAPSHOTS and 
`CollectionSnapshotMetaData.toNamedList()`: `snapshots`, each snapshot, its 
`replicas`
   - `DeleteBackupCmd`: the `deleted` purge summary
   - `SnapShooter.deleteNamedSnapshot`: the replication `deletebackup` details
   - `InstallShardDataCmd`: the "recovering from leader" entry; it was a 
`NamedList` over a `Map.of`, so its two keys were also in random order before
   
   Internal, never serialized as is:
   
   - `CollectionHandlingUtils` internal `STATUS: failed` marker, 
`UpgradeCoreIndexOp` (converted with `asMap`), `CollectionStatus` v2 (repacked 
into the typed response), `CollectionsHandler` DISTRIBUTEDAPIPROCESSING (copied 
into the response with `addAll`), and the `ReplicationHandler` leader-config 
fallback.
   
   Left as `NamedList` on purpose:
   
   - The v1 replication `commits` entries: #5240 restored their flat shape and 
`ReplicationCommitsV1ResponseTest` pins it.
   - The Overseer and async wrappers (`OverseerTaskProcessor`, 
`DistributedApiAsyncTracker`, `OverseerConfigSetMessageHandler`, 
`DistributedCollectionConfigSetCommandRunner`, the async-submit echo in 
`CollectionsHandler`, the snapshot commands' shard results). Their contents 
surface through REQUESTSTATUS next to the main Overseer `results` list, which 
must stay a `NamedList` because `success`/`failure` can repeat. Converting only 
some of them would make the stored response's shape depend on the failure mode, 
so they should be decided together, later.
   
   AI disclosure: the site classification, the edits, the notes and this 
description were drafted with Claude Code and reviewed by me.
   
   # Tests
   
   No new tests: the shape change is the documented intent of this SIP step and 
the existing suites exercise every changed path. Ran `OverseerStatusTest`, 
`TestSkipOverseerOperations`, `CollectionsAPISolrJTest`, 
`TestSolrCloudSnapshots`, `TestSolrCoreSnapshots`, `DeleteBackupCmdTest`, 
`LocalFSCloudIncrementalBackupTest`, `TestLocalFSCloudBackupRestore`, 
`BackupRestoreApiErrorConditionsTest`, `TestReplicationHandlerBackup`, 
`TestSnapshotCoreBackup`, `TestIncrementalCoreBackup`, 
`ReplicationCommitsV1ResponseTest`, `UpgradeCoreIndexActionTest` and the 
`handler.admin.api` backup/snapshot suites: 91 tests, all pass. Plus `./gradlew 
check -x test`. INSTALLSHARDDATA has no functional test today; that hunk is a 
two-key map and was reviewed by hand.
   
   # Checklist
   
   Please review the following and check all that apply:
   
   - [x] I have reviewed the guidelines for [How to 
Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my 
code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request 
title.
   - [x] I have given Solr maintainers 
[access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
 to contribute to my PR branch. (optional but recommended, not available for 
branches on forks living under an organisation)
   - [x] I have developed this patch against the `main` branch.
   - [x] I have run `./gradlew check`.
   - [ ] I have added tests for my changes.
   - [x] I have added documentation for the [Reference 
Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide)
   - [x] I have added a [changelog 
entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my 
change
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to