[CDRIVER-3329] Driver still tries to resume change streams after encountering NonResumableChangeStreamError Created: 21/Aug/19  Updated: 28/Oct/23  Resolved: 23/Aug/19

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.15.1

Type: Bug Priority: Major - P3
Reporter: Kaitlin Mahar Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident

 Description   

I noticed while running the test added via SPEC-1214 that mongoc seemed to still attempt resuming - using command monitoring I saw the following order of events:

  • successful aggregate
  • a successful insert
  • a failed getMore
  • a successful killCursors
  • a failed aggregate

Looking at mongoc-change-stream.c, I believe this is because the code here checks for "NonRetryableChangeStreamError" rather than "NonResumableChangeStreamError".

I think this mistake occurred because the original commit for SPEC-1214 wrongly used "retryable" in the .rst file. This was corrected in a subsequent commit under the same ticket number.



 Comments   
Comment by Githook User [ 23/Aug/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3329 fix error label check
Branch: r1.15
https://github.com/mongodb/mongo-c-driver/commit/59742684040c89708bfe7ed857efb38c65f30d98

Comment by Githook User [ 23/Aug/19 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CDRIVER-3329 fix error label check
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/10f6ee9458449790125410a6293433a39aa9e9c1

Comment by Kevin Albertson [ 22/Aug/19 ]

Oh good catch. I think when I implemented this I incorrectly assumed that the JSON spec tests that referred to "NonResumableChangeStreamError" were exercising this. As part of this fix, we'll add tests for errors with "NonResumableChangeStreamError" label.

Generated at Wed Feb 07 21:17:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.