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

Should getlasterror block on a brand-new connection?

    XMLWordPrintable

Details

    • Question
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • 1.9.2
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: