[SERVER-25676] getLastError with write concern may return early after call to createIndexes on same connection Created: 17/Aug/16 Updated: 06/Dec/22 Resolved: 19/Dec/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.2.9, 3.3.11 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Andy Schwerin | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Sharding
|
||||
| Operating System: | ALL | ||||
| Sprint: | Sharding 2016-08-29 | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
The code for tracking the optime of the last write operation, specifically when that operation was index creation, has a bug on mongos that is exposed when the createIndexes command was forwarded to one or more shards using a new connection. Specifically, sometimes mongos will mistakenly believe that the optime of the createIndexes operation one or more shards was (0|0), causing waits for write concern >= w:2 to return too early. |
| Comments |
| Comment by Sheeri Cabral (Inactive) [ 19/Dec/19 ] |
|
Gone away as per Randolph's previous comment. |
| Comment by Randolph Tan [ 21/Apr/17 ] |
|
The specific bug schwerin mentioned on the last comment should no longer happen on master. The current master code will always use the exact host name for createIndex. |
| Comment by Andy Schwerin [ 07/Sep/16 ] |
|
This bug surfaces because the RunOnAllShards command framework uses DBClientRS to do targeting and execution of remote commands, and the sharding callback hooks installed there are sometimes invoked with the replica set connection string, and sometimes with the exact hostname. The best solution would be to rewrite the RunOnAllShards command framework to use the shard and host targeting frameworks developed for the 3.4 release. |
| Comment by Githook User [ 19/Aug/16 ] |
|
Author: {u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}Message: Until a proper fix for |