You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For transactional read operations that only touch one tablet, currently we pick the read hybrid time on the tablet server hosting the YQL engine processing a transaction (i.e. the tablet server that has the transaction manager for this transaction). However, this tablet server might be different from the leader of the tablet that has the data to be read (the transaction participant). If there is also a clock skew, and if the transaction manager's hybrid time is in the future compared to the transaction participant, we will be waiting for the safe time on the transaction participant to reach the read timestamp picked by the transaction manager. To mitigate a potential latency on these single-tablet read-only workloads, we need to defer the choice of the read timestamp to the transaction participant in these cases.
kmuthukk
changed the title
Read time for single-tablet transactions should be picked on the tablet server if possible
[dist-txns] Read time for single-tablet transactions should be picked on the tablet server if possible
Dec 12, 2018
…ible
Summary:
We could delay picking transaction read time for a Snapshot Isolation transaction until the start of first
operation in that transaction. And if this first operation is single tablet, we could pick the read time at
tablet server, not on the YQL proxy side (YCQL or YSQL). Moreover, we could perform a read restart
at this tablet server, if necessary, and use the restarted time as read time of the whole transaction.
Also removed start_time from transaction metadata, since it is the same as read time. Instead, added
a new field metadata_write_ht to transaction metadata persisted in the provisional records RocksDB
on every participating tablet, that is only used for compaction-time cleanup of aborted transactions.
Test Plan: ybd --cxx-test ql-transaction-test --gtest_filter QLTransactionTest.PickReadTimeAtServer
Reviewers: timur, robert, mikhail
Reviewed By: mikhail
Subscribers: bharat, ybase, bogdan
Differential Revision: https://phabricator.dev.yugabyte.com/D6305
For transactional read operations that only touch one tablet, currently we pick the read hybrid time on the tablet server hosting the YQL engine processing a transaction (i.e. the tablet server that has the transaction manager for this transaction). However, this tablet server might be different from the leader of the tablet that has the data to be read (the transaction participant). If there is also a clock skew, and if the transaction manager's hybrid time is in the future compared to the transaction participant, we will be waiting for the safe time on the transaction participant to reach the read timestamp picked by the transaction manager. To mitigate a potential latency on these single-tablet read-only workloads, we need to defer the choice of the read timestamp to the transaction participant in these cases.
Cc @robertpang @spolitov
The text was updated successfully, but these errors were encountered: