Description
Some current and future features require us to "hold" the Low Watermark (LWM). For example, while a read-only tx is active at a given timestamp, LWM can't be adjusted past that timestamp.
Currently, TxManagerImpl subscribes to LOW_WATERMARK_BEFORE_CHANGE and the event handler returns a future that waits for all relevent RO TXns to finish. This approach is not easy to understand and reuse.
A more clear and explicit approach is to introduce the following methods to LowWatermark interface:
- void lock(lockerId, HybridTimestamp ts)
- void release(lockerId)
LWM can't be adjusted past any currently locked timestamps.