phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curtis Howard <>
Subject Tephra transaction - SELECT after INSERT shows missing data
Date Tue, 11 Dec 2018 20:20:18 GMT

We have an application that issues two sequential inserts within the same
transaction using Spring (JTA, currently passing 'read_committed' and
propagation.REQUIRED options).  The app verifies the first insert's data is
available before proceeding to the second insert, similar to the following

void insertOuter(Object obj1, Object obj2) throws SomeException {
// Spring call to insert obj1 into Phoenix transactional table1

void insertInner(Object obj) throws SomeException {
checkToEnsureObj1WasInserted() // ** THIS FAILED
... // code to insert object 2

We encountered a single intermittent failure last week, where
checkToEnsureObj1WasInserted() could not find the first insert's data
(otherwise, the check has always succeeded in the past).

Spring's Propagation.REQUIRED option ensures insertInner() is part of the
same same transaction initiated by insertOuter():
And as we understand it, the first insert's data should be available within
the same transaction context given snapshot isolation and the Phoenix

Is there particular logging that we can look for (or enable, if needed) to
1) our transactions are in-fact using Tephra snapshot isolation
2) any lower level Tephra transaction details which may help us
troubleshoot this issue, if and when it occurs again?

Thanks very much

View raw message