MonetDB concurrent commits exception
Hi, I am running a setup on MonetDB where in concurrent transactions take place. Everything works very fine but for a few transactions getting aborted due to SQLExceptions. I have set *auto commit to false* for all these transactions. I am getting frequent SQLExceptions with the message as *java.sql.SQLException: COMMIT: failed* But if I retry the same transaction, this works fine. Any idea on what would be the reason for frequent commit fails? When I set *auto commit to true* for the transactions, I get similarly frequent Exceptions but the message becomes *java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts* Is it like both the exception thrown be for the same cause? Any help much appreciated. Thanks in Advance. Vijayakrishna.P. Mobile : (+91) 9500402305.
Hai Vijay, This blog might give you the answers you’re looking for. In general, it’s no big deal (in MonetDB) if your transactions get aborted due concurrency conflicts. You can just retry the transaction until it succeeded. However, if the level of concurrency is high, you might want to introduce a random break before retrying a transaction. Regards, Jennie
On Nov 13, 2015, at 14:45, Vijay Krishna
wrote: Hi,
I am running a setup on MonetDB where in concurrent transactions take place. Everything works very fine but for a few transactions getting aborted due to SQLExceptions.
I have set auto commit to false for all these transactions. I am getting frequent SQLExceptions with the message as java.sql.SQLException: COMMIT: failed
But if I retry the same transaction, this works fine. Any idea on what would be the reason for frequent commit fails?
When I set auto commit to true for the transactions, I get similarly frequent Exceptions but the message becomes java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts
Is it like both the exception thrown be for the same cause?
Any help much appreciated.
Thanks in Advance.
Vijayakrishna.P. Mobile : (+91) 9500402305. _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Please have a careful look at https://www.monetdb.org/blog/monetdb-sql-transaction-management-scheme. regards On 13/11/15 14:45, Vijay Krishna wrote:
Hi,
I am running a setup on MonetDB where in concurrent transactions take place. Everything works very fine but for a few transactions getting aborted due to SQLExceptions.
I have set *auto commit to false* for all these transactions. I am getting frequent SQLExceptions with the message as *java.sql.SQLException: COMMIT: failed*
But if I retry the same transaction, this works fine. Any idea on what would be the reason for frequent commit fails?
When I set *auto commit to true* for the transactions, I get similarly frequent Exceptions but the message becomes *java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts*
Is it like both the exception thrown be for the same cause?
Any help much appreciated.
Thanks in Advance.
Vijayakrishna.P. Mobile : (+91) 9500402305.
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
Hi,
Thanks a lot Martin and Jennie..
I understand the Transaction flow. What I actually doubted was "Do the
transaction aborts due to concurrency conflicts produce the same Throwable
message when auto commit is turned ON and OFF?"
Because I am getting two kinds of messages. I am wondering if both occur
due to the same cause.
*If autocommit=false ---> java.sql.SQLException: COMMIT: failed*
*If autocommit=true ---> **java.sql.SQLException: COMMIT: transaction is
aborted because of concurrency conflicts*
If both the messages are caused by the same concurrency conflicts, why not
show the same message appropriately despite of the autocommit status?
Please correct me if I am wrong. Thanks in advance.
Thanks & Regards,
Vijayakrishna.P.
Mobile : (+91) 9500402305.
On Fri, Nov 13, 2015 at 7:33 PM, Martin Kersten
Please have a careful look at https://www.monetdb.org/blog/monetdb-sql-transaction-management-scheme.
regards
On 13/11/15 14:45, Vijay Krishna wrote:
Hi,
I am running a setup on MonetDB where in concurrent transactions take place. Everything works very fine but for a few transactions getting aborted due to SQLExceptions.
I have set *auto commit to false* for all these transactions. I am getting frequent SQLExceptions with the message as *java.sql.SQLException: COMMIT: failed*
But if I retry the same transaction, this works fine. Any idea on what would be the reason for frequent commit fails?
When I set *auto commit to true* for the transactions, I get similarly frequent Exceptions but the message becomes *java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts*
Is it like both the exception thrown be for the same cause?
Any help much appreciated.
Thanks in Advance.
Vijayakrishna.P. Mobile : (+91) 9500402305.
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
On Nov 17, 2015, at 07:52, Vijay Krishna
wrote: Hi,
Thanks a lot Martin and Jennie..
I understand the Transaction flow. What I actually doubted was "Do the transaction aborts due to concurrency conflicts produce the same Throwable message when auto commit is turned ON and OFF?"
Because I am getting two kinds of messages. I am wondering if both occur due to the same cause. If autocommit=false ---> java.sql.SQLException: COMMIT: failed If autocommit=true ---> java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts
If both the messages are caused by the same concurrency conflicts, why not show the same message appropriately despite of the autocommit status?
Agree with you. I’d also expect the same msg. So in this case, you might need to look into the JDBC driver code, to see where is the first SQLException triggered. Maybe have a look at the exceptions stack trace first? Jennie
Please correct me if I am wrong. Thanks in advance.
Thanks & Regards,
Vijayakrishna.P. Mobile : (+91) 9500402305.
On Fri, Nov 13, 2015 at 7:33 PM, Martin Kersten
wrote: Please have a careful look at https://www.monetdb.org/blog/monetdb-sql-transaction-management-scheme. regards
On 13/11/15 14:45, Vijay Krishna wrote: Hi,
I am running a setup on MonetDB where in concurrent transactions take place. Everything works very fine but for a few transactions getting aborted due to SQLExceptions.
I have set *auto commit to false* for all these transactions. I am getting frequent SQLExceptions with the message as *java.sql.SQLException: COMMIT: failed*
But if I retry the same transaction, this works fine. Any idea on what would be the reason for frequent commit fails?
When I set *auto commit to true* for the transactions, I get similarly frequent Exceptions but the message becomes *java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts*
Is it like both the exception thrown be for the same cause?
Any help much appreciated.
Thanks in Advance.
Vijayakrishna.P. Mobile : (+91) 9500402305.
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
It's not the JDBC driver that produces different messages. It's the server itself. Because the code for having or not having autocommit is different, the messages are generated in different places. I agree it would make a lot of sense if the messages were still the same. On 11/17/2015 11:42 AM, Ying Zhang wrote:
On Nov 17, 2015, at 07:52, Vijay Krishna
wrote: Hi,
Thanks a lot Martin and Jennie..
I understand the Transaction flow. What I actually doubted was "Do the transaction aborts due to concurrency conflicts produce the same Throwable message when auto commit is turned ON and OFF?"
Because I am getting two kinds of messages. I am wondering if both occur due to the same cause. If autocommit=false ---> java.sql.SQLException: COMMIT: failed If autocommit=true ---> java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts
If both the messages are caused by the same concurrency conflicts, why not show the same message appropriately despite of the autocommit status?
Agree with you. I’d also expect the same msg.
So in this case, you might need to look into the JDBC driver code, to see where is the first SQLException triggered. Maybe have a look at the exceptions stack trace first?
Jennie
Please correct me if I am wrong. Thanks in advance.
Thanks & Regards,
Vijayakrishna.P. Mobile : (+91) 9500402305.
On Fri, Nov 13, 2015 at 7:33 PM, Martin Kersten
wrote: Please have a careful look at https://www.monetdb.org/blog/monetdb-sql-transaction-management-scheme. regards
On 13/11/15 14:45, Vijay Krishna wrote: Hi,
I am running a setup on MonetDB where in concurrent transactions take place. Everything works very fine but for a few transactions getting aborted due to SQLExceptions.
I have set *auto commit to false* for all these transactions. I am getting frequent SQLExceptions with the message as *java.sql.SQLException: COMMIT: failed*
But if I retry the same transaction, this works fine. Any idea on what would be the reason for frequent commit fails?
When I set *auto commit to true* for the transactions, I get similarly frequent Exceptions but the message becomes *java.sql.SQLException: COMMIT: transaction is aborted because of concurrency conflicts*
Is it like both the exception thrown be for the same cause?
Any help much appreciated.
Thanks in Advance.
Vijayakrishna.P. Mobile : (+91) 9500402305.
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Sjoerd Mullender
participants (4)
-
Martin Kersten
-
Sjoerd Mullender
-
Vijay Krishna
-
Ying Zhang