Consider using peek(lk) rather than unsafePeek

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Networking & Observability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In VersionedValue we introduced an unsafePeek method that requires the caller to have an higher level lock to guarantee safe access. One such example is acquiring the replication lock before calling unsafePeek in ReplCoordinatorImpl.

      I believe having a `peek(lk)` method would be preferable than `unsafePeek()`. It is more standard in our codebase to use `WithLock` and it provides a level of safety (admittedly not perfect safety).

            Assignee:
            Unassigned
            Reporter:
            Didier Nadeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: