File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -661,7 +661,25 @@ public SockIO getSock( String key, Integer hashCode ) {
661661 // if we failed to get a socket from this server
662662 // then we try again by adding an incrementer to the
663663 // current hash and then rehashing
664- hv += ("" + hv + tries ).hashCode ();
664+ switch ( hashingAlg ) {
665+ case NATIVE_HASH :
666+ hv += ("" + tries + key ).hashCode ();
667+ break ;
668+
669+ case OLD_COMPAT_HASH :
670+ hv += origCompatHashingAlg ( "" + tries + key );
671+ break ;
672+
673+ case NEW_COMPAT_HASH :
674+ hv += newCompatHashingAlg ( "" + tries + key );
675+ break ;
676+
677+ default :
678+ // use the native hash as a default
679+ hv += ("" + tries + key ).hashCode ();
680+ hashingAlg = NATIVE_HASH ;
681+ break ;
682+ }
665683 }
666684
667685 return null ;
You can’t perform that action at this time.
0 commit comments