Experiencing issue wherein there is lag in db commit

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Experiencing issue wherein there is lag in db commit

Santosh Tripathi
We are experiencing issue wherein there is lag in db commit although the following statements after the Ibatis insert has been executed.
Unable to fetch the record inserted in a separate resulting in Record not found for few cases due to this issue.
Anyone familiar with this kind of issue and what could be done to mitigate it.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Experiencing issue wherein there is lag in db commit

Mark Nolan
You don't give much detail!

Which db engine? How are you managing transactions (what causes the commit)? When you say "statements after the insert", do you mean Java statements or SQL statements?

.

On Thu, 9 Jan 2020, 01:35 Santosh Tripathi, <[hidden email]> wrote:
We are experiencing issue wherein there is lag in db commit although the following statements after the Ibatis insert has been executed.
Unable to fetch the record inserted in a separate resulting in Record not found for few cases due to this issue.
Anyone familiar with this kind of issue and what could be done to mitigate it.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAENMeXkLZ3TtX1VOzaqVCMy4-VAKAXpLwTm1Q92AtpYrVzOsew%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Experiencing issue wherein there is lag in db commit

Santosh Tripathi
Hi Mark,
Let me provide the details .Statements after the insert are Java statements execute.
Also the db fetch is a separate session alltogether.
We are using Oracle as the database.
Transaction managed through org.springframework.jdbc.datasource.DataSourceTransactionManager and Apache Commons DBCP connection pool as the connectionpool.

Regards,
Santosh


On Wednesday, January 8, 2020 at 6:02:53 PM UTC-8, Mark Nolan wrote:
You don't give much detail!

Which db engine? How are you managing transactions (what causes the commit)? When you say "statements after the insert", do you mean Java statements or SQL statements?

.

On Thu, 9 Jan 2020, 01:35 Santosh Tripathi, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LbUw47UDDwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">santo...@...> wrote:
We are experiencing issue wherein there is lag in db commit although the following statements after the Ibatis insert has been executed.
Unable to fetch the record inserted in a separate resulting in Record not found for few cases due to this issue.
Anyone familiar with this kind of issue and what could be done to mitigate it.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="LbUw47UDDwAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybati...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/85f23f57-48c2-44d5-b0ab-a81f6749e7d9%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Experiencing issue wherein there is lag in db commit

Mark Nolan

Are you using annotated transactions (@Transaction)? Is the extra Java code that is executed in the same method as the SQL and is that method annotated with @Transaction?
.


On Thu, 9 Jan 2020 at 03:48, Santosh Tripathi <[hidden email]> wrote:
Hi Mark,
Let me provide the details .Statements after the insert are Java statements execute.
Also the db fetch is a separate session alltogether.
We are using Oracle as the database.
Transaction managed through org.springframework.jdbc.datasource.DataSourceTransactionManager and Apache Commons DBCP connection pool as the connectionpool.

Regards,
Santosh


On Wednesday, January 8, 2020 at 6:02:53 PM UTC-8, Mark Nolan wrote:
You don't give much detail!

Which db engine? How are you managing transactions (what causes the commit)? When you say "statements after the insert", do you mean Java statements or SQL statements?

.

On Thu, 9 Jan 2020, 01:35 Santosh Tripathi, <[hidden email]> wrote:
We are experiencing issue wherein there is lag in db commit although the following statements after the Ibatis insert has been executed.
Unable to fetch the record inserted in a separate resulting in Record not found for few cases due to this issue.
Anyone familiar with this kind of issue and what could be done to mitigate it.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/85f23f57-48c2-44d5-b0ab-a81f6749e7d9%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CAENMeXmE1Jfn%3DMgJ7jT4AuLz8BSMuz2R-Ld258hsJ0%2B5fnoCiQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Experiencing issue wherein there is lag in db commit

Santosh Tripathi
No, the java code is separate from the transaction method and not part of the same method as the SQL.

On Thursday, January 9, 2020 at 10:12:20 AM UTC-8, Mark Nolan wrote:

Are you using annotated transactions (@Transaction)? Is the extra Java code that is executed in the same method as the SQL and is that method annotated with @Transaction?
.


On Thu, 9 Jan 2020 at 03:48, Santosh Tripathi <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xya6GZ04DwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">santo...@...> wrote:
Hi Mark,
Let me provide the details .Statements after the insert are Java statements execute.
Also the db fetch is a separate session alltogether.
We are using Oracle as the database.
Transaction managed through org.springframework.jdbc.datasource.DataSourceTransactionManager and Apache Commons DBCP connection pool as the connectionpool.

Regards,
Santosh


On Wednesday, January 8, 2020 at 6:02:53 PM UTC-8, Mark Nolan wrote:
You don't give much detail!

Which db engine? How are you managing transactions (what causes the commit)? When you say "statements after the insert", do you mean Java statements or SQL statements?

.

On Thu, 9 Jan 2020, 01:35 Santosh Tripathi, <[hidden email]> wrote:
We are experiencing issue wherein there is lag in db commit although the following statements after the Ibatis insert has been executed.
Unable to fetch the record inserted in a separate resulting in Record not found for few cases due to this issue.
Anyone familiar with this kind of issue and what could be done to mitigate it.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Xya6GZ04DwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybati...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/mybatis-user/85f23f57-48c2-44d5-b0ab-a81f6749e7d9%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/mybatis-user/85f23f57-48c2-44d5-b0ab-a81f6749e7d9%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/mybatis-user/85f23f57-48c2-44d5-b0ab-a81f6749e7d9%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/mybatis-user/85f23f57-48c2-44d5-b0ab-a81f6749e7d9%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/a08a9059-94f8-44db-bbbd-fbd5780cb47c%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Help, weird ClassCastException crash me

晴天的小猪
In reply to this post by Mark Nolan

I posted two posts on Google forums, but they disappeared after refreshing, I can only try to send email directly, excuse me.


Basic Information :

  1. mybatis version : 3.3.0
  2. oracle version : 11.2.0.4
  3. java version : 1.8.0_72
  4. ojdbc version : 6-11.2.0.3


Phenomenon :

Occasionally, ClassCastException is reported. See the attachment for the contents of the exception. After checking the logic, no exception is found. On another server, the same code, ojdbc version is 7, there is no similar error.

For some reason, we are unable to upgrade the ojdbc version at this time. Have you encountered similar problems? Are you willing to help me find the cause? Thank you.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/tencent_AE92FD95131E68EF7ED9EC0B1A897CE55007%40qq.com.
Reply | Threaded
Open this post in threaded view
|

Re: Experiencing issue wherein there is lag in db commit

Iwao AVE!
In reply to this post by Santosh Tripathi
Hi Santosh,

This could happen when the transaction isolation level is READ ONLY.
You should read the entire post, but here is the relevant sentence:

> A READ ONLY transaction is equivalent to a REPEATABLE READ or SERIALIZABLE transaction that cannot perform any modifications in SQL. A transaction using a READ ONLY isolation level sees only those changes that were committed at the time the transaction began .

If this is the case, changing the isolation level to READ COMMITTED may resolve the issue.
Of course, the transaction inserted the row must be committed before executing select.

If it didn't help, please try creating a small executable project replicating the issue.
We may need to see the code and the configuration related to the series of operations.

Regards,
Iwao

On Thu, Jan 9, 2020 at 10:35 AM Santosh Tripathi <[hidden email]> wrote:
We are experiencing issue wherein there is lag in db commit although the following statements after the Ibatis insert has been executed.
Unable to fetch the record inserted in a separate resulting in Record not found for few cases due to this issue.
Anyone familiar with this kind of issue and what could be done to mitigate it.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/0cd213b1-457a-4b0b-91c7-40554850f6ef%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2Buep2RNL8z1rq7Bi4%3DDxhLUGD_zFFXwJOA%2Bfwtd77VZ7PZ5uQ%40mail.gmail.com.