R
Rick
I have a table TableB which holds references to table TableA. I have one
process Process2, invoked by another process Process1, that deletes all
records in both tables and then repopulates them, all in a single
transaction. It then notifies Process1, which in turn reads the new data.
My problem occurs when Process2 has completed, and Process1 is reading the
data. It first reads in the entire TableA, and then reads in the entire
TableB. However, when reading in TableB, Process1 occasionally finds rows
referencing TableA rows that have not been loaded. When this situation
occurs, Process1 throws an exception. If I then ask Process1 to try to read
the data again, it succeeds. If I look at the raw data, all is well.
My theory is... even though Process2 thinks it has committed all the
changes, there is a time lag (due to asynchronous transaction(s)??). When
Process1 reads TableA, it omits new rows not yet committed. Then when it
gets to loading TableB, it finds rows referencing TableA data that was
missed.
Is my theory likely to be right? If so, would specifying a different
transaction isolation level in the Process2 transaction cure the problem?
Thx!
process Process2, invoked by another process Process1, that deletes all
records in both tables and then repopulates them, all in a single
transaction. It then notifies Process1, which in turn reads the new data.
My problem occurs when Process2 has completed, and Process1 is reading the
data. It first reads in the entire TableA, and then reads in the entire
TableB. However, when reading in TableB, Process1 occasionally finds rows
referencing TableA rows that have not been loaded. When this situation
occurs, Process1 throws an exception. If I then ask Process1 to try to read
the data again, it succeeds. If I look at the raw data, all is well.
My theory is... even though Process2 thinks it has committed all the
changes, there is a time lag (due to asynchronous transaction(s)??). When
Process1 reads TableA, it omits new rows not yet committed. Then when it
gets to loading TableB, it finds rows referencing TableA data that was
missed.
Is my theory likely to be right? If so, would specifying a different
transaction isolation level in the Process2 transaction cure the problem?
Thx!