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

Should getlasterror block on a brand-new connection?

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: