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

Should getlasterror block on a brand-new connection?

    • Type: Icon: Question Question
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.9.2
    • Component/s: None
    • Labels:
      None

      If you call getlasterror on a new connection to the database, you'll get an error because no writes have been issued.

      But the semantics of getlasterror are evolving, since you can now use it to wait for secondaries to catch up with the latest write.

      So the question is this: if using getlasterror with a 'w' value, does it make sense to block until the latest operation applied to the primary's oplog has been replicated? I think it might.

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            kbanker Kyle Banker
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: