[JAVA-647] stale read issue in a ReplicaSet setup Created: 18/Sep/12 Updated: 18/Sep/12 Resolved: 18/Sep/12 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Paul Kim | Assignee: | Barrie Segal |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Ubuntu 10.04 gokoSet:PRIMARY> db.serverBuildInfo() |
||
| Issue Links: |
|
||||
| Description |
|
We are having stale read issue in a ReplicaSet setup. The use cases are below. What is the best way to resolve these issues? First, some info with our setup. We have multiple servers which are all talking to mongo. ReplicaSet: 1 Primary and 2 Secondary gokoSet:PRIMARY> db.serverBuildInfo() Case#1 - When two of the same API calls execute very close to each other. Here's some pseudo code. createRoomApi(name) { else { room = findRoomByName(name); } return room; insertRoomIntoDB(name) { catch (MongoException.DuplicateKey) { log("duplicate room name: " + name); } // if MongoException.DuplicateKey, returns null API call #1 - CreateRoom("MyRoom") API call #2 - CreateRoom("MyRoom") Case #2 - We have a transactional operation within the one API call. ObjectA is parent of ObjectB is a parent of ObjectC Insert Object A |
| Comments |
| Comment by Paul Kim [ 18/Sep/12 ] |
|
Oops, please close this. This was supposed to be created in Commercial Support |