Hello,

 

i'm now testing sequoia 2.10.6 with 1-controller, but 2 db-backends
(postgres). As accused, in my application I have transformed all
nextval-statements to stored procedure syntax: {call
nextval('SEQ_NAME')}.

 

But now I'm getting javax.ejb.DuplicateKeyException on client-side.
Aren't the stored-procedure calls broadcasted to both db-backends
anymore? In the log I'm only seeing that one whole transaction is
rollbacked, but I'm seeing not which and why - but it looks for me, that
the {call nextval('SEQ_QSCATEGORIES')} and an resulting
javax.ejb.DuplicateKeyException (thrown on client-side) could be the
cause. See following log-excerpt of transaction 835.

 

BTW: If I use 2-controller with each only 1 backend scenario, all seems
fine - DuplicateKeyException occurs only, if I use 2 database-backends
on one controller:

 

Any help for solving the problem?

 

 

2007-02-28 17:01:06,587 DEBUG sequoia.controller.scheduler Begin
scheduled - current pending transactions: 1

2007-02-28 17:01:06,588 DEBUG sequoia.controller.scheduler Begin
scheduled - current pending writes: 1

2007-02-28 17:01:06,588 DEBUG controller.RequestManager.qualiproof-dev
Begin transaction 835

2007-02-28 17:01:06,588 DEBUG sequoia.controller.scheduler Begin
completed, remaining pending writes: 0

2007-02-28 17:01:06,588 DEBUG controller.RequestManager.qualiproof-dev
Scheduling read Request (3154): SELECT t0_Location.ID FROM
farmer_locati...

2007-02-28 17:01:06,588 DEBUG controller.RequestManager.qualiproof-dev
Load balancing read request (3154): SELECT t0_Location.ID FROM
farmer_locati...

2007-02-28 17:01:06,602 DEBUG controller.RequestManager.qualiproof-dev
Scheduling read Request (3155): SELECT CREATE_USER, CREATE_DATE,
CHANGE_...

2007-02-28 17:01:06,602 DEBUG controller.RequestManager.qualiproof-dev
Load balancing read request (3155): SELECT CREATE_USER, CREATE_DATE,
CHANGE_...

2007-02-28 17:01:06,609 DEBUG controller.RequestManager.qualiproof-dev
Scheduling read Request (3156): SELECT t0_a.ID, t0_a.CREATE_USER,
t0_a.C...

2007-02-28 17:01:06,609 DEBUG controller.RequestManager.qualiproof-dev
Load balancing read request (3156): SELECT t0_a.ID, t0_a.CREATE_USER,
t0_a.C...

2007-02-28 17:01:06,619 DEBUG controller.RequestManager.qualiproof-dev
Scheduling read Request (3157): SELECT t0_a.ID, t0_a.CREATE_USER,
t0_a.C...

2007-02-28 17:01:06,619 DEBUG controller.RequestManager.qualiproof-dev
Load balancing read request (3157): SELECT t0_a.ID, t0_a.CREATE_USER,
t0_a.C...

2007-02-28 17:01:06,629 DEBUG controller.RequestManager.qualiproof-dev
Scheduling read Request (3158): SELECT t0_a.ID, t0_a.CREATE_USER,
t0_a.C...

2007-02-28 17:01:06,629 DEBUG controller.RequestManager.qualiproof-dev
Load balancing read request (3158): SELECT t0_a.ID, t0_a.CREATE_USER,
t0_a.C...

2007-02-28 17:01:06,638 INFO
virtualdatabase.VirtualDatabaseWorkerThread.qualiproof-dev
Statement.executeQuery() detected a stored procedure ({call
nextval('SEQ_QSCATEGORIES')}) remapping the call to
CallableStatement.executeQuery()

2007-02-28 17:01:06,638 DEBUG controller.RequestManager.qualiproof-dev
Broadcasting request {call nextval('SEQ_QSCATEGORIES')} transaction 835
to all controllers (Member(address=/192.168.10.94:33918,
uid=192.168.10.94:33918)->[Member(address=/192.168.10.94:33918,
uid=192.168.10.94:33918)])

2007-02-28 17:01:06,660 DEBUG controller.virtualdatabase.qualiproof-dev
handleMessageSingleThreaded (class
org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedCa
llableStatementExecuteQuery): S 3159 835 {call
nextval('SEQ_QSCATEGORIES')}

2007-02-28 17:01:06,660 DEBUG controller.virtualdatabase.qualiproof-dev
192.168.10.94:25322: Scheduling distributedRequest 3159 from
Member(address=/192.168.10.94:33918, uid=192.168.10.94:33918)

2007-02-28 17:01:06,660 DEBUG controller.virtualdatabase.qualiproof-dev
handleMessageMultiThreaded (class
org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedCa
llableStatementExecuteQuery): S 3159 835 {call
nextval('SEQ_QSCATEGORIES')}

2007-02-28 17:01:06,660 DEBUG controller.virtualdatabase.qualiproof-dev
192.168.10.94:25322: Executing distributedRequest 3159 from
Member(address=/192.168.10.94:33918, uid=192.168.10.94:33918)

2007-02-28 17:01:06,660 DEBUG sequoia.controller.scheduler Schedule
{call nextval('SEQ_QSCATEGORIES')} - Current pending writes: 1

2007-02-28 17:01:06,660 DEBUG controller.RequestManager.qualiproof-dev
Read Stored Procedure (3159) : {call nextval('SEQ_QSCATEGORIES')}

2007-02-28 17:01:06,661 DEBUG controller.RequestManager.qualiproof-dev
Logging transaction 835 begin

2007-02-28 17:01:06,662 DEBUG backend.DatabaseBackend.postgresql-94
Scheduling request {call nextval('SEQ_QSCATEGORIES')} in non conflicting
queue

2007-02-28 17:01:06,662 DEBUG backend.DatabaseBackend.postgresql-94
Adding task CallableStatementExecuteQueryTask for transaction 835 ({call
nextval('SEQ_QSCATEGORIES')}) to pending request queue

2007-02-28 17:01:06,662 DEBUG backend.DatabaseBackend.postgresql-94
Executing task CallableStatementExecuteQueryTask for transaction 835
({call nextval('SEQ_QSCATEGORIES')})

2007-02-28 17:01:06,663 DEBUG backend.DatabaseBackend.postgresql-95
Scheduling request {call nextval('SEQ_QSCATEGORIES')} in non conflicting
queue

2007-02-28 17:01:06,663 DEBUG backend.DatabaseBackend.postgresql-95
Adding task CallableStatementExecuteQueryTask for transaction 835 ({call
nextval('SEQ_QSCATEGORIES')}) to pending request queue

2007-02-28 17:01:06,663 DEBUG backend.DatabaseBackend.postgresql-95
Executing task CallableStatementExecuteQueryTask for transaction 835
({call nextval('SEQ_QSCATEGORIES')})

2007-02-28 17:01:06,674 DEBUG backend.DatabaseBackend.postgresql-95 Task
CallableStatementExecuteQueryTask for transaction 835 ({call
nextval('SEQ_QSCATEGORIES')}) completed

2007-02-28 17:01:06,676 DEBUG backend.DatabaseBackend.postgresql-94 Task
CallableStatementExecuteQueryTask for transaction 835 ({call
nextval('SEQ_QSCATEGORIES')}) completed

2007-02-28 17:01:06,678 DEBUG sequoia.controller.scheduler Stored
procedure completed, remaining pending writes: 0

2007-02-28 17:01:06,691 DEBUG controller.RequestManager.qualiproof-dev
Request {call nextval('SEQ_QSCATEGORIES')} completed.

2007-02-28 17:01:06,691 DEBUG controller.RequestManager.qualiproof-dev
Request 3159 completed successfully.

2007-02-28 17:01:06,692 DEBUG controller.RequestManager.qualiproof-dev
Scheduling read Request (3160): SELECT COUNT(*) FROM qscategories WHERE
...

2007-02-28 17:01:06,692 DEBUG controller.RequestManager.qualiproof-dev
Load balancing read request (3160): SELECT COUNT(*) FROM qscategories
WHERE ...

2007-02-28 17:01:06,696 DEBUG controller.RequestManager.qualiproof-dev
Broadcasting request rollback transaction 835 to all controllers
(Member(address=/192.168.10.94:33918,
uid=192.168.10.94:33918)->[Member(address=/192.168.10.94:33918,
uid=192.168.10.94:33918)])

2007-02-28 17:01:06,698 DEBUG controller.virtualdatabase.qualiproof-dev
handleMessageSingleThreaded (class
org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedRo
llback): Rollback transaction 835

2007-02-28 17:01:06,698 DEBUG controller.virtualdatabase.qualiproof-dev
handleMessageMultiThreaded (class
org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedRo
llback): Rollback transaction 835

2007-02-28 17:01:06,698 DEBUG sequoia.controller.scheduler Rollback
scheduled - current pending writes: 1

2007-02-28 17:01:06,699 DEBUG controller.RequestManager.qualiproof-dev
Rollback transaction 835

2007-02-28 17:01:06,700 DEBUG backend.DatabaseBackend.postgresql-94
Adding task RollbackTask (835) to pending request queue

2007-02-28 17:01:06,700 DEBUG backend.DatabaseBackend.postgresql-94
Executing task RollbackTask (835)

2007-02-28 17:01:06,701 DEBUG backend.DatabaseBackend.postgresql-94 Task
RollbackTask (835) completed

2007-02-28 17:01:06,703 DEBUG backend.DatabaseBackend.postgresql-95
Adding task RollbackTask (835) to pending request queue

2007-02-28 17:01:06,703 DEBUG backend.DatabaseBackend.postgresql-95
Executing task RollbackTask (835)

2007-02-28 17:01:06,704 DEBUG backend.DatabaseBackend.postgresql-95 Task
RollbackTask (835) completed

2007-02-28 17:01:06,705 DEBUG sequoia.controller.scheduler Rollback
completed, remaining pending transactions: 0

2007-02-28 17:01:06,706 DEBUG sequoia.controller.scheduler Rollback
completed, remaining pending writes: 0

2007-02-28 17:01:06,710 DEBUG controller.RequestManager.qualiproof-dev
Request rollback completed.

2007-02-28 17:01:06,710 DEBUG controller.RequestManager.qualiproof-dev
Rollback of transaction 835 completed.

 

 

 

Greetings Sebastian

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

Reply via email to