Open ehudl opened 9 years ago
So I have some answers:
I agree with that this case is same as #41. Please read my comment on the issue, and give me some any feedback if you still thinks it's weird behavior of Haeinsa.
In addition, here are my answers to your questions:
commit()
. Situation that row remaining in unstable state till expiration can be caused by sudden client machine blackout or unexpected long running transaction. And, ABORT
is needed to mark transaction as in aborting.ConflictException
with "this row is unstable and not expired yet"
message. This is also described on wiki. (See: https://github.com/VCNC/haeinsa/wiki/How-to-Use#important-information) This is inevitable, because Haeinsa uses 'optimistic concurrency control'. Other transaction libraries on top of NoSQL, like Percolator, Themis, Omid and so on, are also has the problem. We recommend use Haeinsa in low-conflict environment.Note: Granularity of lock in Haeinsa is a entire row but other transaction libraries are mostly a single cell. So conflict can be occurs more often in Haeinsa in specific cases. But with this trade-off, Haeinsa could provide high performance (even can be faster than raw HBase API in specific cases) See: https://github.com/VCNC/haeinsa/wiki/Performance
And If you use Haeinsa in low conflict environment, conflict rate is not so high. In our practical use case, failure by conflict rate is just 0.0003% to 0.0010%. See: https://github.com/VCNC/haeinsa/wiki/Performance#conflict-rates
And, this is picture that illustrates your situation:
Execution of commit takes much longer time than illustrated. So "unstable row" conflict will occur much more than illustrated.
We are running some load / performance tests on the haeinsa. To check recovery time , our scenario is running X transactions with 2 threads. Each transaction has the same 3 rows. If some fail, retry again with only one thread.
We expected that the first retry using only one thread will succeed to commit all, one by one. but we see that this is not always the case, moreover when X > =100 we sometimes get into long loop of "this row is unstable and not expired yet"
So 3 questions: