Raidb1 load balancer and WaitForCompletionPolicy=first doesnot work
-------------------------------------------------------------------

         Key: SEQUOIA-955
         URL: https://forge.continuent.org/jira/browse/SEQUOIA-955
     Project: Sequoia
        Type: Bug

  Components: Core  
    Versions: Sequoia 2.10.8    
 Environment: Windows XP
    Reporter: xavier roques
    Priority: Critical


If have a VirtualDatabase with two backends db1 and db2, the load balancer is 
the Raiddb1 and the waitForCompletionPolicy is First.

DB1 and DB2 are up. My application makes a lot of updates and after some time 
one of the Database is disabled.
I don't undertstand why, because the database is up.

After some searches I find out that database was disabled because of a timeout 
while trying to get a new connection.
My pool of connection 50 was full  ? But I released all my connections ...

So now, I will explain why it does not work.

There is a load balancer with two backends: Db1 and DB2. Each backend has its 
own queue and the queue of each backend is managed by different a thread.

A lot of updates are sent to the virtualdatabase.
The load balancer dispatches the requests on each backend. Now let's us suppose 
that the two following requests arrive.
Request 1 (update)
Request 2 (commit)

The load balancer sends the request 1 on each backend and wait for the first 
completion.
If the thread managing the DB1 executes the request 1 and send the result to 
the load balancer. It is possible that the load balancer dispatch the request 2 
even if the Request 1 has not been started on the DB2.

The code of the loadBalancer RAIDDB1.commit is:
{code}
 for (int i = 0; i < nbOfThreads; i++)
    {
      DatabaseBackend backend = (DatabaseBackend) enabledBackends.get(i);
      if (backend.isStartedTransaction(lTid))
        commitList.add(backend);
    }
{code}

Unfortunately when this code is executed the backend DB2 may not have started 
to execute the request 1 so the commit will only be pushed on the backend 1.

So when the request 1 will be executed on DB2, a new connection will be open 
and it will never be released because the commit will never be executed on the  
backend DB2.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to