[SERVER-77256] Unable to read from a snapshot due to pending collection catalog changes; please retry Created: 18/May/23 Updated: 27/Oct/23 Resolved: 27/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.18 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Elias Soykat | Assignee: | Backlog - Triage Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | mongoose, session, transactions | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Triage
|
| Operating System: | ALL |
| Steps To Reproduce: | ```js ); const pageIds = cratePages.map((page) => page.id); await CollectionB.findByIdAndUpdate( , $push: { pages: { $each: pageIds } } }, if (isDelete) { }, { session });
if (!cratePages || !updateSite) { await session.abortTransaction(); await session.endSession(); return null; } await session.commitTransaction(); return cratePages; } catch(err) { await session.abortTransaction(); await session.endSession(); throw err; }``` |
| Participants: |
| Description |
5.12
18
6
macOS
13
Hey there! I'm using mongodb transaction over the operation. I insert many documents using `insertMany` in `CollectionA` then i $set and $push CollectionA ids in `CollectionB` a particular fields. then finally i delete few specific documents from `CollectionA` Lets share an example :
This is a graphql api. after running this api it's seems work perfectly but when i test this resolvers code using `mocha` and `chai.js` but when i run the test some times I passed the test (means work) and some times test throw bellow error ` , , |
| Comments |
| Comment by Edwin Zhou [ 27/Oct/23 ] |
|
For this issue we'd like to encourage you to start by asking our community for help by posting on the MongoDB Developer Community Forums. If the discussion there leads you to suspect a bug in the MongoDB server, then we'd want to investigate it as a possible bug here in the SERVER project. Kind regards, |