[09:57:21] <Beldramma> hi ! do we know benchmarks for MongoDB ? I have to compare performances of different databases, i chose MongoDB, InfluxDB, SQlite and maybe Prometheus for the moment.
[12:28:35] <GothAlice> … more than 5 years ago I achieved 1.9 million distributed RPC calls using MongoDB as the job collection and push notification queue (capped collection), involving three messages per job (added, picked up, completed), or ~5.7 million inserts per second on a single Core i7 laptop with two producers (job requestors) and three consumers (job workers).
[12:28:53] <GothAlice> When in doubt: benchmark it yourself; each workload is distinct.
[12:29:16] <GothAlice> 1.9m dRPC calls per second, that is.
[17:43:13] <tengonakamuri> Hello. I a have an issue to recreate a database. Should I use db.dropDatabase() to do it?
[17:44:41] <tengonakamuri> I have found, that I can use db drop only after client connection to this database. But if I drop it, then I can't create a collection without reconnecting.
[17:45:01] <tengonakamuri> Because reconnection allows to create a new pure db.
[17:45:28] <tengonakamuri> Any idea how to recreate db with official mongodb node.js provider?
[17:58:43] <GothAlice> tengonakamuri: Database construction (like collection construction) is automatic, and on-demand. If it does not exist and an attempt is made to modify it, it now exists.
[18:00:06] <tengonakamuri> GothAlice, I use node,js official provider, so I don't know how can I drop database and create it again through one session.
[18:01:21] <tengonakamuri> I get an error " MongoError: topology was destroyed" when I try 1) connect to db 2) drop db 3) create new collection
[18:01:46] <GothAlice> tengonakamuri: Consider, if you have a “handle” (reference) to a database, then delete that database, the reference would understandably no longer be valid. You’d need to ascend from the database back up to the connection, acquire a new handle.
[18:02:50] <GothAlice> I don’t Node/JS (for all sorts of reasons), but, in Python (consider it p-code): db = …somehow get a reference to it…; con = db.connection; db.drop(); db = con[‘collection’]; … move right along …
[18:14:28] <tengonakamuri> GothAlice, in Node.js I 1) Create a client 2) Connect to database by name 3) Only after connection I can drop it 4) Drop database 5) Create and fill a collection
[18:14:41] <tengonakamuri> Actual result: an error about topology
[19:38:11] <GothAlice> tengonakamuri: http://s.webcore.io/753c3d456a18/2019-34-26--recording.svg ← also not a problem Python seems to have. "Hanging" references to databases remain valid (recreate on next write use), and dropping a database is entirely a connection level concern, databases do not self-delete.