Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3027

Fix and improve causal consistency Go driver examples

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • None

      The "Causal Consistency Example 2" in examples.go (see here) seems to not work correctly. Specifically, the example creates session2 and sets operation and cluster time on that session, but then calls UseSessionWithOptions and uses that SessionContext to actually run the operations. There seems to be no relationship between those sessions, so it seems like the example doesn't actually use a causally consistent session and would be misleading to anyone who reads it. Additionally, it's not clear if that example in examples.go is actually used in any documentation. It would be much more useful if it was part of a testable example.

      Definition of done:

      • Correct the causal consistency example(s) in examples.go.
      • Test that the causal consistency example(s) actually create causal consistency within and between sessions.
      • Add a causal consistency testable example to the Session documentation.

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: