Comments (8)
I don't know if this is related but in a more complex application we did also get worrisome side-effects from these kind of transactions, where a findById
or findOne
looking up a document that has been deleted in the previous transactions suddenly returns something like this:
{
ok: 1,
'$clusterTime': {
clusterTime: new Timestamp({ t: 1715964070, i: 18 }),
signature: {
hash: Binary.createFromBase64('QvEPV74zpqEMIRD5lLDYPkfxsV8=', 0),
keyId: new Long('7330005257113567234')
}
},
operationTime: new Timestamp({ t: 1715964070, i: 18 })
}
This looks like some mongo internals that should never be returned by findById
.
Might be another bug tho, and I'm still trying to get this into a small reproducible snippet.
from mongoose.
I noticed in your repo script you're using a local connection. Transactions can only be used on replica sets. Just want to confirm that you tested on a replica set before creating the issue.
from mongoose.
from mongoose.
Related Issues (20)
- bulkWrite does not throw an error if all documents are invalid (ordered: false) HOT 4
- Accessing the .toObject() of a subdocument inside of a method raises a typing error HOT 3
- Document methods are not available when it is populated HOT 1
- StrictModeError: Path "$comment" is not in schema, strict mode is `true`, and upsert is `true` HOT 5
- Return the deleted document after a deleteOne operation HOT 2
- Describe `deleteOne` or `remove` method of Document in the doc HOT 3
- Merging of discrimintor schema "_indexes" duplicates when both 'from' and 'to' are schema instances HOT 1
- MongoServerError: $natural sort cannot be set to a value other than -1 or 1 when using $natural with another field in sorting HOT 3
- Document.toObject() does not apply to subdocuments HOT 1
- Pre validate: is not triggert on all sub documents when set via _.set() with a nested path HOT 1
- Using mongoose and got error when adding new data: Product validation failed HOT 1
- Discriminators: Return derived model when issuing Find on base model HOT 4
- When updating elements of primitive array using positional filtered operator, update value is incorrectly cast to array
- empty objects are being saved as null HOT 1
- Autoindex is recreating existing indexes HOT 3
- StrictPopulateError: Cannot populate path `totalLinksList` because it is not in your schema. Set the `strictPopulate` option to false to override. HOT 1
- Breaking types of `toObject` on SubDocument or ArraySubdocument HOT 1
- Make autoIndex syncIndex instead of createIndex HOT 6
- new Types.ObjectId is deprecated how do i convert a string _id to an ObjectID now? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongoose.