-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
As a newcomer to this code, I was reading callsites of RecoveryUnit::getPointInTimeReadTimestamp, like this one as if it were a normal getter function - one with no side effects that just returned the read timestamp. But it turns out that it actually opens a storage transaction in some cases!
That was unexpected. In addition there are other usages like here where I wonder if the author knew that this was an anticipated side effect. Personally, I would not have expected this line to sometimes open a snapshot.
Renaming this function something like establishPointInTimeReadTimestamp or something that sounded less like a passive getter might make this behavior less surprising to future users/readers.