[SERVER-20370] AwaitData doesn't work properly with WiredTiger OplogHack visibility logic Created: 11/Sep/15 Updated: 07/Oct/15 Resolved: 17/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.9 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Eric Milkie | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Steps To Reproduce: | Working on a simple reproducer for this. |
| Sprint: | RPL 9 (09/18/15) |
| Participants: |
| Description |
|
If you make an AwaitData query on the oplog, it may not return newly inserted data in a timely fashion. This problem only occurs with WT and does not happen with MMAP, so we suspect that the custom oplog visibility code for WiredTiger may not be interacting properly with the new condition variable signaling mechanism for AwaitData queries. |
| Comments |
| Comment by Githook User [ 22/Sep/15 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |
| Comment by Githook User [ 17/Sep/15 ] |
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: |
| Comment by Eric Milkie [ 14/Sep/15 ] |
|
It ought to work as one might expect, I believe. |
| Comment by Mathias Stearn [ 11/Sep/15 ] |
|
We need to think about what to do about the combination of AwaitData and readConcern level=majority. |
| Comment by Scott Hernandez (Inactive) [ 11/Sep/15 ] |
|
Yep, just confirmed (in code) that we signal an invisible document insert, and return from getmore without being able to return that doc. |
| Comment by Eric Milkie [ 11/Sep/15 ] |
|
We might also need to suppress the signaling after the insert completes normally – or somehow otherwise notice that new data hasn't appeared even though we were signaled. Otherwise, we still risk returning the query with no data, even though we haven't waited the entire AwaitData period. |
| Comment by Scott Hernandez (Inactive) [ 11/Sep/15 ] |
|
I believe we need to have the visibility code, when the recovery unit runs, also signal (notify_all) the oplog insert listeners – support for this will be included in this code: |