Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-70821

Rename RecoveryUnit::getPointInTimeReadTimestamp

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: