PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 18th of July, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:21:40] <inspiron> i'm trying to update a nested element in a collection and if it doesn't exist then have it created. here is what i tried https://paste.pound-python.org/show/zegOyjZp9aoysneNj9Ux/ This is in python but just seeing how to do it in regular mongo would help if a python answer can't be given
[02:42:53] <inspiron> is it possible to just update something based on the key? and if that key doesn't exist then insert something
[02:43:03] <inspiron> seems like everything in the api needs the value for the key
[02:43:23] <inspiron> if map['location'] doesn't exist then make it. otherwise update it
[02:43:32] <inspiron> that's all i want to do
[03:36:19] <joannac> inspiron: sounds like an upsert
[03:36:44] <joannac> unless you're talking about a specific field rather than a document
[03:37:00] <joannac> in which case you probably want $set
[04:07:47] <inspiron> thanks
[07:25:15] <stefandxm> my google skills are failing me; when are mongodb or the mongodb c++ drivers automatically changing _id from string to objectid?
[07:25:21] <stefandxm> and how to prevent it :)
[07:25:41] <stefandxm> (iam guessing it is when the string is so short it fits an object id)
[07:25:47] <stefandxm> but i wonder if its the driver or mongodb that does it
[07:25:55] <stefandxm> _id is being appended as a std::string
[08:34:35] <stefandxm> ah
[08:34:36] <stefandxm> it wasnt that
[08:34:48] <stefandxm> but that the driver/database some time took the ID from the query rather than the object. if it was not set
[08:34:50] <stefandxm> but not always :)
[08:34:52] <stefandxm> tricky
[08:48:26] <sumi> hello
[12:13:36] <cheeser> 1
[13:12:27] <atbe> 2
[13:53:03] <tantamount> 3
[14:20:55] <atbe> hey peeps
[14:21:12] <atbe> is there a breakdown of the interpretation of mongodb log entries?
[14:22:07] <atbe> 2016-07-18T10:09:58.554-0400 I NETWORK [conn8099] end connection 10.77.8.247:39648 (69 connections now open)
[14:22:37] <atbe> TIMESTAMP - ? - ? - [?] - MESSAGE
[14:22:43] <atbe> what are those 3 in the middle
[14:22:51] <atbe> I for info? So log level?
[14:23:00] <atbe> the stuff in the []'s?
[15:09:27] <atbe> Ah, so the stuff in the [] is the context
[15:09:36] <atbe> Will it always be surrounded by []'s?
[15:09:52] <atbe> Disregard, stewwpid q's
[18:01:30] <n1colas> Hello
[18:04:38] <UberDuper> atbe: That's the connection ID. When a new connection is made, the log shows the id (but in a different format). It can be convenient to grep on a connection id to see everything a connection did.
[18:04:55] <UberDuper> And iirc that connection id can also be seen in currentOp()
[20:35:24] <CasperGhost1> Cant get ssl to work with mongodb can anyone help me out?
[20:36:56] <UberDuper> CasperGhost1: Do you have an ssl enabled version?
[20:37:40] <CasperGhost1> yes i think so
[20:38:30] <CasperGhost1> version v3.0.12
[20:39:21] <UberDuper> Some binaries aren't compiled with ssl enabled. Like the generic linux tar. IIRC the distro dependent ones like Redhat have it in 3.0.x
[20:42:14] <CasperGhost1> i get two different errors depending on how i have my .pem files arranged im assuming its just my ssl files are wrong " no SSL certificate provided by peer; connection rejected" or "error unknown CA"
[20:42:32] <UberDuper> Ah
[20:43:43] <UberDuper> If self signed you're going to need a copy of the CA cert on each member of the cluster. And also on the client unless you disable cert verification which I wouldn't recommend.
[20:44:13] <UberDuper> Guess same is true of legit certs if they came with a intermediate cert.
[20:44:34] <CasperGhost1> i got legit
[20:45:22] <CasperGhost1> got a wild card ssl from comodo
[20:48:28] <CasperGhost1> the PEMKeyFile i think i got correct cuz its just the ssl & priv key right?
[20:50:01] <CasperGhost1> but the CAPEM idk lol been trying forever cant get it
[21:06:35] <UberDuper> CasperGhost1: I don't remember off the top of my head how those are supposed to be setup.
[21:10:00] <MacWinner> is there a way to use .update() to change a value conditionally? like update a field only if the current value is lower than the new value