Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9399

Delete requests do not send credentials & fails for Basic Authentication

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0, 6.0.1
    • Fix Version/s: 7.4, 8.0
    • Component/s: SolrJ
    • Labels:

      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)

      { version = (Long) map.get(VER); }

      Slice slice = router.getTargetSlice(deleteId, null, null, null, col);
      if (slice == null)

      { return 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)

      { UpdateRequest urequest = (UpdateRequest) request.getRequest(); urequest.deleteById(deleteId, version); }

      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

            Activity

              People

              • Assignee:
                erickerickson Erick Erickson
                Reporter:
                susheel2777@gmail.com Susheel Kumar
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m