Description
The getRoutes(..) func of UpdateRequest do not pass credentials to LBHttpSolrClient when deleteById is set while for updates it passes the credentials. See below code snippet
if (deleteById != null) {
Iterator<Map.Entry<String,Map<String,Object>>> entries = deleteById.entrySet()
.iterator();
while (entries.hasNext()) {
Map.Entry<String,Map<String,Object>> entry = entries.next();
String deleteId = entry.getKey();
Map<String,Object> map = entry.getValue();
Long version = null;
if (map != null)
Slice slice = router.getTargetSlice(deleteId, null, null, null, col);
if (slice == null)
List<String> urls = urlMap.get(slice.getName());
if (urls == null) { return null; }
String leaderUrl = urls.get(0);
LBHttpSolrClient.Req request = routes.get(leaderUrl);
if (request != null)
else
{ UpdateRequest urequest = new UpdateRequest(); urequest.setParams(params); urequest.deleteById(deleteId, version); urequest.setCommitWithin(getCommitWithin()); request = new LBHttpSolrClient.Req(urequest, urls); routes.put(leaderUrl, request); } }
}
Attachments
Issue Links
- is duplicated by
-
SOLR-10530 Basic Authentication Plugin blockUnknown HTTP ERROR 401 require authentication
- Closed
-
SOLR-11885 Solrj client deleteByIds handle route request miss wrap basic auth credentials
- Closed
-
SOLR-12049 Solrj doesn't pass basic auth for delete requests
- Closed
-
SOLR-12503 SolrJ deleteById doesn't work when authentication is active.
- Closed
- is related to
-
SOLR-12161 CloudSolrClient with basic auth enabled will update even if no credentials supplied
- Open
- links to