XiaoMi / themis

Themis provides cross-row/cross-table transaction on HBase based on google's percolator.
Apache License 2.0
226 stars 67 forks source link

questions about concurrent prewrite/commit #5

Open c4pt0r opened 9 years ago

c4pt0r commented 9 years ago

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

c4pt0r commented 9 years ago

Code is based on branch:for_hbase_0.98