PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 13th of October, 2020

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[06:05:23] <z16> Does anyone know how to use the `load` function inside a MongoDB playground, specifically in VS Code?
[13:30:13] <pagios> hello, i have a nodejs server that mainly commmunicates with mongo and adds a value/request to a collection document. the document takes 10 values MAX, thus the first 10 requests should go into this collection and update it. Now i am a bit concerned about atomicity and how concurrency would be handled in this case, how can i handle 2 concurrent requests that come from nodejs into mongo and both update that document resulting in 11 values instead
[13:30:13] <pagios> of 10 which is inconsistent?
[13:32:46] <dreamreal> https://www.mongodb.com/blog/post/quick-start-nodejs--mongodb--how-to-implement-transactions
[13:34:49] <pagios> dreamreal: should i handle it as sycnhronously from nodejs?
[13:36:49] <dreamreal> the transactions can be set to block: not my call to make
[13:38:33] <pagios> dreamreal: when you say block, do you mean "they wait" ? and i dont need to handle any errors or retry righT? they would just auto-resume when the transaction completes? Can i think of them as synchronous ?
[13:39:47] <dreamreal> I'm not entirely sure
[13:40:01] <dreamreal> I don't have the same problem, so I haven't really tried
[15:20:03] <pagios> hello, i have a nodejs server that mainly commmunicates with mongo and adds a value/request to a collection document. the document takes 10 values MAX, thus the first 10 requests should go into this collection and update it. Now i am a bit concerned about atomicity and how concurrency would be handled in this case, how can i handle 2 concurrent requests that come from nodejs into mongo and both update that document resulting in 11 values instea
[15:20:03] <pagios> d of 10 which is inconsistent?
[17:47:17] <pagios> hello, const request = require('request-promise-native'); <--- if i do request.get and another request.get after it, does the first request.get gets overwritten and wont surely execute?
[17:47:38] <pagios> as i understand it is asynchronous
[17:47:49] <pagios> and calling it wtice will overwrite the first request?
[19:19:24] <fredl> hi, is there something comparable to the .my.cnf for mongo?
[19:20:31] <fredl> I know there's .mongorc.js