Hosung-Lee / log4jdbc

Automatically exported from code.google.com/p/log4jdbc
0 stars 0 forks source link

batching issue and logging weird #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
not exactly sure.

in 1.2 alpha1(we are moving to alpha2 which has the batch.clear which "may"
fix this).

I am going to ease into the major issue which is at the bottom and causing
database commit failures in our production environment but please read
through it.

Basically, in my logs, I keep seeing this log 

2010-04-20 17:34:51,760 INFO  [jdbc.sqlonly] (http-0.0.0.0-8080-3)
[player][session:QsWA__][OP1521] batching 9 statements: 1: insert into
VOICELOG.Tpvcalldata (displayrule, displaytype, label,

I can't tell where this comes from.  In the source code it looks like every
batching should look like this log does...

2010-04-20 17:34:52,050 ERROR [jdbc.sqlonly] (http-0.0.0.0-8080-3)
[player][session:QsWA__][OP1521] 1619. PreparedStatement.executeBatch()
batching 9 statements:

I searched the past month of logs in production.  This second log occurs
only twice and when it does, it results in a failure as it is preceded by
the first log which has already committed data so I think log4jdbc may be
causing a double commit(inserting same values twice).  What I don't get
when looking at the source code is I see in StatementSpy.executeBatch where
the second log is logged.  I don't ever see how the first log is possible.

We have had this production issue twice in the past month.  We are rolling
out 1.2alpha2 this weekend(If this issue goes away, I will update this
ticket though i would like to know where the first log comes from?? in the
source code)

Original issue reported on code.google.com by dean.hil...@gmail.com on 29 Apr 2010 at 8:54

GoogleCodeExporter commented 8 years ago
after looking more, I still only see log(sql, method) where method is
"executeUpdate".  what is strange is that the one log never shows the method.  
The
only word "batching" throughout the log4jdbc source code is always logged with 
the
method and sometimes with the getClassType returning PreparedStatement, and 
looks
like someetimes maybe with getClassType returning Statement so why is there no 
class
type on the first log....I am missing something here.

Original comment by dean.hil...@gmail.com on 29 Apr 2010 at 8:59

GoogleCodeExporter commented 8 years ago
never mind, that is the before and after log, so I am not sure this is a 
log4jdbc
issue at this point...close this issue.

Original comment by dean.hil...@gmail.com on 29 Apr 2010 at 9:19

GoogleCodeExporter commented 8 years ago

Original comment by arthur.b...@gmail.com on 30 Apr 2010 at 12:39

GoogleCodeExporter commented 8 years ago
found the issue on our end....definitely not a log4jdbc issue and found out 
more on
how the logging works.

Original comment by dean.hil...@gmail.com on 30 Apr 2010 at 2:39