[CDRIVER-3306] Do not assume non-empty server reply implies stream is still valid Created: 11/Aug/19 Updated: 28/Oct/23 Resolved: 31/Mar/20 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Bulk API, libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.17.0-beta, 1.17.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Roberto Sanchez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
UPDATE: This ticket has been cloned so that the clone will cover Scenario 1 (as described by Kevin's comment from 03/09/2020) and this original ticket will cover Scenario 2 (as described in the aforementioned comment). A mongoc_server_stream_t should not be reused after calling mongoc_cluster_run_command_monitored on with the stream. In two situations, the stream will disconnect and be invalidated: When that happens, the server_stream for that operation is no longer valid. But we do not always account that correctly. _mongoc_write_opmsg (incorrectly) always ends unordered bulk operations on error because of _mongoc_write_opquery only sets must_stop to true for what it deems is a network error (of which, that check might not be quite right if error labels were applied). But it does not handle the case of a "not master" or "node is recovering" error causing a disconnect. |
| Comments |
| Comment by Githook User [ 31/Mar/20 ] |
|
Author: {'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}Message: |