After reading a value, Q, a transaction, T, only needs to know the first change to Q's wts
to determine how reading Q affects the upper-bound of T's commit time.
T can get notified when the wts
of a value it reads changes by adds its id to a list of ids attached to Q. When T2 commits and overwrites Q, it will use the list of ids to send a message to each transaction that read from Q. The message will contain the new wts
of Q. After sending all the messages, T2 will clear the list of ids attached to Q.
The list of ids is called tags.
def read(T, key):
if key in T.WS:
return WS[key].data