You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Sankar Hariappan (JIRA)" <ji...@apache.org> on 2018/03/09 08:38:00 UTC
[jira] [Created] (HIVE-18923) ValidWriteIdList snapshot per table
can be cached for multi-statement transactions.
Sankar Hariappan created HIVE-18923:
---------------------------------------
Summary: ValidWriteIdList snapshot per table can be cached for multi-statement transactions.
Key: HIVE-18923
URL: https://issues.apache.org/jira/browse/HIVE-18923
Project: Hive
Issue Type: Sub-task
Components: Transactions
Affects Versions: 3.0.0
Reporter: Sankar Hariappan
Assignee: Sankar Hariappan
Fix For: 3.0.0
Currently, for each query within a multi-statement transaction, it would request metastore/TxnHandler to build ValidWriteIdList snapshot for the given table. But, the snapshot won't change within the duration of transaction. So, it make sense to cache it within QueryTxnManager.
However, each txn should be able to view their own written rows. So, when a transaction allocates writeId to write on a table, then the cached ValidWriteIdList on this table should be recalculated as follows.
Original ValidWriteIdList: \{hwm=10, open/aborted=5,6} – (10 is allocated by txn < current txn_id).
Allocated writeId for this txn: 13 – (11 and 12 are taken by some other txn > current txn_id)
New ValidWriteIdList: \{hwm=12, open/aborted=5,6,11, 12} – (11, 12 are added to invalid list, so the snapshot remains same).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)