Repository navigation
SOLR-16398: Add V2 JAX-RS APIs for GET replication restore status and commits. - #5217
Conversation
There was a problem hiding this comment.
self-review ✅
precommit ✅
local testing [pending][will do after first round of review]
@epugh @gerlowskija Can you trigger github copilot review to start with?
|
|
||
| @GET | ||
| @CoreApiParameters | ||
| @Path("/restore/status") |
There was a problem hiding this comment.
although V2 api sheet suggests GET /restore for this, but imo, GET /restore/status is more comprehensive.
|
Quick Review: AI-generated. Static review. |
Is this something we can solve in a seperate PR @jaykay12 ? @nick-boss-tech do you by chance have a unit test demonstrating the issue? |
@epugh Yes. The test is on a fork branch rather than this PR: diff against this branch. It adds ReplicationCommitsV1ResponseTest with two cases for command=commits, one with json.nl=flat and one with the default JSON style. Result on each side. Both cases pass on base 07fdebd and fail on this head 9599df2. On this head, each commit entry comes back as a map ({indexVersion=..., generation=..., filelist=[...]}) instead of the flat name/value array. The default json.nl is flat, so callers who don't set a style are affected too, not only the non-default ones. Cherry-pick onto this branch. Validated from a fresh clone of jaykay12/solr: AI-generated. Adjacent ticket that I worked on. arrntv keeps NamedList entries in a fixed array shape, so its tests are a useful reference for the 5217 fix. |
yes, sure @epugh this will be a quick fix in a follow-up PR. I also checked it via local testing, what nick pointed out is this change in the v1 response. I will also see if any past api also got any such regression or not as well, that will also be part of this fix PR.
|
|
humm, I wonder if we should just pull in the test that @nick-boss-tech mentioned, and fix here? Otherwise, I sort of feel like I should create a JIRA to track this so we don't forget? |
|
This PR is almost ready, I won't forget for sure, have added it in my task list. I can initialise a draft PR for now, if that eases you 😁 But if tracking via Jira is something you recommend, that works as well. |
you have eased my mind! It's one of htose things, if we forget it bites us down the road ;-) |







https://issues.apache.org/jira/browse/SOLR-16398
Description
Add V2 JAX-RS APIs for GET replication restore status and commits.
Solution
Used Cursor for approach & self-code reviews. Code is fully vetted by Jalaz Kumar.
Tests
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.