XiaoMi/themis

questions about concurrent prewrite/commit

c4pt0r opened this issue · 1 comments

It seems Themis support concurrent prewrite and commit. When reviewing your codes, I've got some questions:

  1. When concurrentPrewriteSecondary failed, shouldn't we rollback the primary row? Just like non-concurrent version. (Transaction.java: prewriteSecondaries)
  2. When commitSecondary failed but primary row is commited, although the secondary lock remains, but the data should be able to read by other transactions by cleaning lock (in this case, commit this row), even after WriteTransactionTTL. But in ThemisEndpoint.java:429 you called checkWriteTTL(System.currentTimeMillis(), prewriteTs, row) without checking the primary row is already committed? It confused me.

Hope for your reply, thanks

Code is based on branch:for_hbase_0.98