[SERVER-3584] Should getlasterror block on a brand-new connection? Created: 11/Aug/11  Updated: 29/Aug/11  Resolved: 12/Aug/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.9.2
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Kyle Banker Assignee: Kristina Chodorow (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 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.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 12/Aug/11 ]

I don't think so.

The semantics for w are: wait for the last operation on this connection to replicate.

Generated at Thu Feb 08 03:03:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.