Re: unable to see new/updated records

From: Mladen Gogala <no_at_email.here.invalid>
Date: Mon, 30 Nov 2009 22:37:51 +0000 (UTC)
Message-ID: <pan.2009.11.30.22.37.50_at_email.here.invalid>



On Mon, 30 Nov 2009 13:46:40 -0800, Arkadiy wrote:

> Hi all,
>
> I am trying to figure out what could cause the following issue.
>
> Our app holds an OCCI connection, using it to obtain new/updated records
> from a table using their timestamps. It runs the select query once
> every 30 min for unlimited period of time (I do realize this is not the
> best way of doing this. The new version will reconnect on every cycle)
> .
>
> We just noticed that the app stopped seeing the new records (the SELECT
> returns nothing). Otherwise everything looks fine.
>
> Could this be because the connection object eventually gets into a wrong
> state?
>
> Thanks for any help,
>
> Arkadiy

Does your app issue something like "BEGIN TRANSACTION"? I've had a Java application that was doing that. The application was issuing the same query over and over again, WITHIN THE SAME TRANSACTION. Transaction is the basic unit of work in a RDBMS and there is something called "ACID rules". If your transaction is started at connect time, you're bound to see only the data that was committed at the time your transaction has begun. That's the law. Try removing that "begin transaction" statement or, if that's not possible, try putting in a "COMMIT" after each select.

-- 
http://mgogala.byethost5.com
Received on Mon Nov 30 2009 - 16:37:51 CST

Original text of this message