Bug #8273 StackOverflowError on fail-back
Submitted: 2 Feb 2005 18:53 Modified: 2 Feb 2005 19:03
Reporter: frederic dekeukelaere Email Updates:
Status: Duplicate Impact on me:
Category:Connector / J Severity:S3 (Non-critical)
Version:3.1.6 OS:Any (All)
Assigned to: CPU Architecture:Any

[2 Feb 2005 18:53] frederic dekeukelaere
in fail-over mode with the parameter autoreconnect set a true, when master becomes available, the driver causes a StackOverflowError when the fail-back fonctionnality is based on secondsBeforeRetryMaster parameter

In the same manner, only on server 4.1.x, parameter queriesBeforeRetryMaster makes trouble if settled under 6

How to repeat:
set url to :


start the test with master_host not avalaible then estalish connection to it and wait 20 seconds

Suggested fix:
in private method initializePropsFromServer add at first :

        this.masterFailTimeMillis = System.currentTimeMillis();
        this.queriesIssuedFailedOver = -10;

this method is called only when new connection is established, so fail-back variables should be invalidated elsewhere it causes a infinite loop when internal requests are made on new server
[2 Feb 2005 19:03] Mark Matthews
Duplicate of #7952 (which is already fixed for 3.1.7).