SQLDataParser.open sets auto-commit

Hello,
I noticed that SQLDataParser.open(~) is setting
auto-commit to false under all circumstances. I am certain there is a reasoning behind this and would be grateful to learn the reasoning.

If this method does set auto-commit to false could it not then call commit() on the connection once it has finished it’s unit of work?

I have a situation where I am doing nothing but reads/selects and my DB2 driver complains that these unfinished txns are a problem. While it does not adversely affect the behavior it certainly is noisy.

Thanks,
Jeff

Sure, open a bug please and put there the description with the error output (if possible).

Thanks,

David.

Opened:
[ Bug #6914 ] DBInputTable will benefit from dbconn.commit() call. (DB2)

Thanks,
Jeff

Makes sense.
What I am experiencing is with DBInputTable, not DBOutputTable. I feel it may be DB2 UDB specific behavior. Other drivers probably don’t mind the absent commit() call on select statements. I imagine a fix for me is to call commit from the dbInputtable.run() after the node finishes its work. Now this would work, but I am not sure this is the correct solution. This would avoid breaking the cyclical commit logic you have put inplace for the DBOutputTable.

Hi !

I see - this is really DB2 specific. Reading from DB usually don’t constitute a transaction.
I may extend the reader/parser to issue a commit at the end of the run() method.
That should make no harm.

David.

Hello,

it is intention. DBOuptuTable has parameter/option “commit” where you can specify commit frequency. If you put 10 there it means every 10 records it calls commit. If you put 1, it should call commit after each record.

Unless you specify MAX_INT there, commit should be called at least at the end of graph run. If you experienece different behaviour, it might be a bug.

David

David,
I don’t think it would cause any harm either. Thanks. Would you like a bug opened to keep track of the change?

Thanks again,
Jeff