moscajs / aedes-persistence-mongodb

MongoDB persistence for Aedes
MIT License
14 stars 16 forks source link

[bug] When using Mongo sharding #60

Open mogupta opened 3 years ago

mogupta commented 3 years ago

System Information

Describe the bug Retained collection is not being populated by Aedes. The following error is thrown inside the executeBulk function. Failed to target upsert by query :: could not extract exact shard key'

mogupta commented 3 years ago

Seems like a mongo shard limitation. https://docs.mongodb.com/manual/reference/method/db.collection.findAndModify/#sharded-collections

robertsLando commented 3 years ago

Seems like a mongo shard limitation

Could you submit a fix to this?

mogupta commented 3 years ago

Sure, but it will be sometime later. I am just trying to reduce the number of mongodb calls on boot.