Change the time slices to a multiple of 1,2,4 instead of 1,2,3,4
@@ -1785,12 +1785,16 @@ public class SQLServerConnection implements ISQLServerConnection {
// Update timeout interval (but no more than the point where we're supposed to fail: timerExpire)
attemptNumber++;
- if (useParallel || useTnir) {
+ if (useParallel) {
intervalExpire = System.currentTimeMillis() + (timeoutUnitInterval * (attemptNumber + 1));
}
else if (isDBMirroring) {
intervalExpire = System.currentTimeMillis() + (timeoutUnitInterval * ((attemptNumber / 2) + 1));
}
+ else if (useTnir) {
+ long timeSlice = timeoutUnitInterval * (1 << (attemptNumber - 1));
+ intervalExpire = System.currentTimeMillis() + timeSlice;
+ }
else
intervalExpire = timerExpire;
// Due to the below condition and the timerHasExpired check in catch block,
