PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 24th of September, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[05:28:54] <freewil> i have a large collection where a ttlmonitor is actively deleting records and is causing perf issues? what is the best way to kill this operation? just delete the index?
[06:31:28] <freewil> i ended up just deleting the index and it stopped the ttlmontior
[06:37:33] <Skyrider> Greetings everyone
[06:40:22] <Skyrider> I know this channel is no longer monitored by members of the MDB team.. but I can still ask a question, right? :p
[07:06:44] <freewil> of course
[07:12:29] <Skyrider> Well, I "had" the issue: /usr/bin/mongod: relocation error: /usr/bin/mongod: symbol curl_easy_strerror version CURL_OPENSSL_3 not defined in file libcurl.so.4 with link time reference
[07:12:41] <Skyrider> But "sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.3.0 /usr/local/lib/libcurl.so.4" fixed it.
[07:12:56] <Skyrider> Not even sure why it provided the error to begin with, as it was working fine until I did a system reboot.
[07:26:50] <Skyrider> Actually, getting it again after erasing libcurl3 and installed libcurl4.
[07:33:08] <Skyrider> freewil: Does it require libcurl3? Using mongodb-org 4.0.12 and
[07:33:15] <Skyrider> Without the and at the end :p
[07:34:22] <freewil> not sure
[07:51:09] <Skyrider> "mongodb-org-server depends on libcurl3"
[07:51:12] <Skyrider> That's just great..
[08:39:23] <Skyrider> And google group is worthless >_>, "An error occurred while communicating with the server." - can't even post.
[09:02:17] <Skyrider> Anyway.. downgraded to mongod 3.6, seeing that one doesn't rely on libcurl3. Which I think in my opinion is a huge flaw.
[11:30:41] <GothAlice> On one hand, heh. Almost got me. I nearly asked "what's the problem with libcurl3", but then I stopped. On the other hand, I did not ask that question. On the gripping hand, enjoy your lack of modern features, change streams, transactions, rather substantial numbers of bug fixes … — if being behind by more than two years is acceptable, then great!
[11:35:12] <GothAlice> https://jira.mongodb.org/issues/?filter=29601 ← 2,165 resolved (CLOSED/Fixed) updates.
[12:03:16] <Intelo> Hi
[12:03:56] <Intelo> I see "project_id" : ObjectId("58b95c84eeddfd0ffc2f56f1"), in a collection. So if I want to insert a new project id in that, can't I just insert "project_id" : "58b95c84eeddfd0ffc2f56f1")?
[12:39:11] <Skyrider> GothAlice: php7-3 curl relies on libcurl4, but 3 and 4 cannot co-exist on the same system by default.
[12:53:59] <GothAlice> Intelo: “inset a new project id in that” is non-sensical, esp. the “in that” part. What are you _actually_ trying to do? Insert a new document (that happens to reference the same project) into the collection? No worries, you can “just insert” a document that includes that field and references a record.
[13:00:27] <Intelo> GothAlice, its ref. yes
[13:01:13] <GothAlice> Intelo: It’s not a reference, really, no. It’s an ObjectId. Seeing a record with that value requires “secret knowlege” of what that field _actually_ references in order to look up that related data.
[13:01:20] <Intelo> so i can just do "project_id" : "58b95c84eeddfd0ffc2f56f1")?
[13:01:32] <GothAlice> That’s worse by a factor of 2.
[13:01:52] <GothAlice> ObjectIds are 12 byte binary values. Storing them as hexidecimal is… terrible. Becuase they don’t compare with real IDs.
[13:01:55] <Intelo> what do you mean
[13:02:07] <Intelo> hm
[13:02:25] <GothAlice> On hex IDs: https://stackoverflow.com/questions/55386030/mongodb-cant-query-subdocument-by-id-returns-null/55386123#55386123
[13:02:36] <GothAlice> On “real references”: https://docs.mongodb.com/manual/reference/database-references/
[13:03:07] <GothAlice> Pay particular attention to the sample code’s “THESE ARE NOT THE SAME” comment.
[13:05:26] <Intelo> GothAlice, so how do I insert in javascript instead of const result = await MyCollection.insert({"project_id": "2lk4j23l4j2"});
[13:05:32] <GothAlice> Hex storage doubles the space they take up, prevents comparison, prevents deserialization as actual ObjectId values (because you’ve made them into strings), which then also ruins the ability to access the inner values (e.g. doc[‘_id’].generation_time), and so forth.
[13:06:17] <GothAlice> Intelo: https://docs.mongodb.com/manual/reference/database-references/#process
[13:07:35] <GothAlice> That’s what you’re doing. Scrolling down a wee bit: https://docs.mongodb.com/manual/reference/database-references/#dbrefs — this is an actual reference, where the reference is self-describing of where to go to look up that related information. No longer is there “secret knowlege” requried to pull in the related data.
[13:07:41] <Intelo> GothAlice, ya maybe I need javascript syntax
[13:08:10] <GothAlice> If you think that page doesn’t contain JS syntax, you need a tutorial on JS.
[13:08:27] <Intelo> https://docs.mongodb.com/ecosystem/drivers/node/
[13:09:13] <GothAlice> Then I can not help you further, http://s.webcore.io/2c7872b2c2c7/alas.jpeg
[13:09:34] <Intelo> GothAlice, thanks but why mongo don't have node syntax docs?
[13:10:01] <GothAlice> Like these ones? http://mongodb.github.io/node-mongodb-native/3.2/api/
[13:10:06] <GothAlice> -_-;
[13:12:12] <Intelo> GothAlice, can't find what I am exactly looking for
[13:13:03] <Intelo> GothAlice, I.e how to insert ObjectId or ISO Date via node so it appears as one and not just simple string
[13:14:28] <GothAlice> Intelo: So, like the fellow I tried helping with my SO answer, linked above, and how he absolutely did not understand what he was doing that was wrong, or that the example I provided demonstrates both the problem *and* the solution, right there, all in a snippet that easily fits on one screen… that is JS.
[13:15:04] <Intelo> ok let me see
[13:17:08] <Intelo> GothAlice, got it ObjectID = require('mongodb').ObjectID,
[13:17:12] <Intelo> thanks
[13:18:00] <Intelo> GothAlice, but don't I need 'new'? in db.foo.insert({_id: ObjectId()}) like db.foo.insert({_id: new ObjectId("sldf3")})
[13:18:50] <GothAlice> Intelo: That is one question that’s infinitely faster for you to try out for yourself, especially given that I absolutely loathe JavaScript with the firey passion of a thousand burning latino suns and don’t use it. My front-end JS is Python.
[13:19:29] <Intelo> how to built websites in python?
[13:19:55] <GothAlice> Any of a thousand or more ways. One needs to define the need before evaluating solutions.
[13:24:10] <Intelo> hm
[13:26:07] <GothAlice> Intelo: You might think this is a joke, but random on a bus asks me to “make a website for him”, I deliver a potato with an 8-bit PIC attached, with an Ethernet plug. Plug it in, it serves the page on demand. Spudserver. He wasn’t careful enough with his specification.
[13:32:18] <GothAlice> (“Uh, this is a potato.” “It’s also your website.” “What? And you’re charging me thousands for a potato?” “No, 10¢ for the potato. 3¢ for the PIC. Thousands for the web development, design, copywriting, and ability to stuff your website onto a potato in the first place.”)