Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4744

ParentConsistentHash::selectParent may select the unavailable parent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.0.0
    • Parent Proxy
    • None

    Description

      code :ParentConsistentHash.cc,begin at line 141
      do { // search until we've selected a different parent.
      prtmp = (pRecord *)fhash->lookup(NULL, &result->chashIter[last_lookup], &wrap_around[last_lookup], &hash);
      if (prtmp)

      { pRec = (parents[last_lookup] + prtmp->idx); }

      } while (prtmp && strcmp(prtmp->hostname, result->hostname) == 0);

      fix it like this:
      if (prtmp)
      pRec = (parents[last_lookup] + prtmp->idx);
      else //begin of added xdchen, line:143
      pRec = NULL; //endof of added by xdchen

      if (prtmp)

      { pRec = (parents[last_lookup] + prtmp->idx); Debug("parent_select", "Selected a new parent: %s.", pRec->hostname); }

      else //begin of added xdchen, line:188
      pRec = NULL; ////end of added xdchen

      }

      Attachments

        Activity

          People

            jrushford John Rushford
            keith2008 xiangdong chen
            Votes:
            0 Vote for this issue
            Watchers:
            3 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 - 2h
                2h