epugh commented on PR #5265:
URL: https://github.com/apache/solr/pull/5265#issuecomment-6607267690

   Quick note on the `app.js` guard in `$scope.showCollection` (the null-check 
added in 16b0d50218b). Traced it down: it's covering a pre-existing, 
deterministic bug unrelated to the split-shard migration, not something 
introduced by this PR.
   
   The surrounding code (`MainController`'s nav refresh) unconditionally does 
`delete $scope.currentCollection` on every page load/navigation, then only 
reassigns it once two chained async calls (`CollectionsV2.listCollections` → 
`AliasesV2.getAliases`) resolve — and only on collection-specific pages. Since 
`ng-model="currentCollection"` on the top-nav collection selector 
(`index.html`) is bound directly to that scope variable, and 
`ng-change="showCollection(currentCollection)"` fires on every change, 
`showCollection(undefined)` fires on *every single page load*, not as a rare 
race. This code is completely untouched by this PR (it's identical on `main`), 
so the bug predates the split-shard work — it was just noticed while testing 
this change in the UI.
   
   The one-line guard is harmless but only treats the symptom; the actual fix 
would be addressing why `currentCollection` is cleared before the new list is 
ready (e.g. don't `delete` it until a refreshed list has failed to match, or 
guard at the `ng-change` call site instead of inside `showCollection` so other 
callers aren't exposed to the same window).
   
   We'd like to pull this fix (plus a few other Admin UI things) into a 
dedicated Admin-UI-focused PR instead, so I'm going to back out the `app.js` 
hunk here to keep this PR scoped to the split-shard JAX-RS migration. No 
objection to the fix itself — just moving it to the right PR.
   


-- 
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