[SERVER-1033] no exception from insert when mongdb is down Created: 21/Apr/10  Updated: 21/Apr/10  Resolved: 21/Apr/10

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: 1.4.1
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Andrea Nicotra Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OS Linux Ubuntu Server 9.10
libboost 1.40
g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1


Participants:

 Description   

1) start mongo db
2) start a base c++ client that start a connection (with autoreconnect enabled) that every 10 seconds do an insert on mongodb.
3) restart mongodb
4) the next one insert for the driver go right (no write is really performed on db), now if I perform another one insert the client recive a SocketException (and the data go lost), at 3rd insert mongo trying to reconnect.

is that a normal behavior?



 Comments   
Comment by Eliot Horowitz (Inactive) [ 21/Apr/10 ]

That is expected.
If you want to ensure a write completes succesfully, you should get getLastError

Generated at Thu Feb 08 02:55:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.