<div dir="ltr">OK, guys,<div><br></div><div>It seems I did the pull request right this time.  Now it contains only my changes, as I verified my forked repo was in full sync with kamailio:master.<br><br>if one of the maintainers could take a look at this pull request, please? It'd be great if it could be at release 5.4.0.<br><br>It's a very small change, just about 50 lines, and a very simple concept. Just rehash of hash, a limited amount of times, when destinations are not available.</div><div><br></div><div>Best regards,</div><div><br></div><div>Luis Rojas (Kalki70 at github)<br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 17, 2020 at 9:30 AM Kalki70 <<a href="mailto:notifications@github.com">notifications@github.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<h4>Pre-Submission Checklist</h4>



<ul>
<li>[ X] Commit message has the format required by CONTRIBUTING guide</li>
<li>[ X] Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li>[ X] Each component has a single commit (if not, squash them into one commit)</li>
<li>[ X] No commits to README files for modules (changes must be done to docbook files<br>
in <code>doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4>Type Of Change</h4>
<ul>
<li><input type="checkbox" id="gmail-m_-8232238422708787910" disabled> Small bug fix (non-breaking change which fixes an issue)</li>
<li>[X ] New feature (non-breaking change which adds new functionality)</li>
<li><input type="checkbox" id="gmail-m_-8232238422708787910" disabled> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4>Checklist:</h4>

<ul>
<li><input type="checkbox" id="gmail-m_-8232238422708787910" disabled> PR should be backported to stable branches</li>
<li>[ X] Tested changes locally</li>
<li>[ X] Related to issue <a href="https://github.com/kamailio/kamailio/issues/2361" target="_blank">#2361</a></li>
</ul>
<h4>Description</h4>
<p>When a destination is selected using one of the hash algorithms (over Call-ID, From, etc.)<br>
and destination is not available, then the next is selected. This causes the following problem :<br>
All messages to the unavailable destination will be sent to the same unique destination.<br>
This will cause that one destination will receive double load and the rest will continue with the same.</p>
<p>Solution : To better distribute messages, while also guaranteeing the same distribution of the hash, a re-hash of the hash is made.</p>
<p>As the rehash could select the same or other failed destination, it can rehash several times. The number of rehashes made is controlled by :</p>
<p>modparam("dispatcher", "ds_rehash_max", -1)</p>
<p>Which can take the following values :</p>
<p>-1 : The total count of destinations is used<br>
0 : Disabled. Reverts to original implementation.<br>
Positive number. Maximum number of rehashes.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href="https://github.com/kamailio/kamailio/pull/2363" target="_blank">https://github.com/kamailio/kamailio/pull/2363</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>dispatcher : better distribution when using hash and destination is not available</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2363/files#diff-b9d00a2976c1b1c5d3535a5ae0e24047" target="_blank">src/modules/dispatcher/dispatch.c</a>
    (49)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/2363/files#diff-5e75274551c31eb6158e6815fd840331" target="_blank">src/modules/dispatcher/dispatcher.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href="https://github.com/kamailio/kamailio/pull/2363.patch" target="_blank">https://github.com/kamailio/kamailio/pull/2363.patch</a></li>
  <li><a href="https://github.com/kamailio/kamailio/pull/2363.diff" target="_blank">https://github.com/kamailio/kamailio/pull/2363.diff</a></li>
</ul>

<p style="font-size:small;color:rgb(102,102,102)">—<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2363" target="_blank">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMG4REGMAG7GQAYX6TRXDAMNANCNFSM4OATJVEA" target="_blank">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMJCSVT3U27FGTQP3DRXDAMNA5CNFSM4OATJVEKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4JRMM2HQ.gif" height="1" width="1" alt=""></p>

_______________________________________________<br>
Kamailio (SER) - Development Mailing List<br>
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Ayudemos a niñas que lo necesitan !<br><a href="http://www.lascreches.cl" target="_blank">www.lascreches.cl</a> !<br><br><br></div>