PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 1st of November, 2018

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[09:34:19] <Derick> no
[11:24:13] <filipac> hello, I'm the user that created this ticket
[11:24:14] <filipac> https://jira.mongodb.org/browse/PHPLIB-396?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=2048689#comment-2048689
[11:26:51] <filipac> maybe we can debug here better
[11:30:19] <Derick> filipac: maybe!
[11:30:41] <Derick> filipac: I was just about to ask for a more fuller bit of code, as I am suspecting something else in your code might change it, or unset it
[11:30:41] <filipac> it's very simple what i am trying to do
[11:32:11] <filipac> it never goes past that line where I call ->aggregate($payload)
[11:32:24] <filipac> that's where the exception comes from
[11:33:20] <Derick> filipac: can you provide a *complete* bit of code? In just a PHP script?
[11:33:31] <Derick> i.e, without any framework around it?
[11:35:31] <filipac> yes
[11:40:00] <Derick> ok?
[11:41:08] <filipac> https://pastebin.com/wH9W4WTK
[11:44:45] <Derick> filipac: thta code can't be right, as it misses the vendor/autoload for \MongoDB\Collection
[11:44:53] <filipac> I have to go to lunch, family is waiting, but this is all the code I have that fails
[11:45:49] <filipac> tought that is implicit, here it is, it is the same but forgot to paste it in pastebin too
[11:45:54] <filipac> https://pastebin.com/vQQW5dJV
[11:47:45] <Derick> filipac: I can reperoduce it, but it makes no sense. Will investigate
[11:47:49] <Derick> reproduce*
[11:48:04] <filipac> see? :D i spend hours debugging it with xdebug
[11:48:16] <filipac> will be right back after lunch
[11:48:30] <Derick> hm, I also know Xdebug :)
[11:48:40] <Derick> (as I wrote it ;-))
[11:55:04] <Derick> filipac: found what it is... and it's not a bug. There are some weird characters in your code just before the $unwind: See the hexdump: https://pastebin.com/8q7uXaXF — the "ef bb bf" is a byte-order mark: https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding — if in my editor (vim), I remove the '$un and rewrite it, it works fine.
[11:57:35] <Derick> actually, vim *shows* that you have this problem in other places in the code too
[12:21:05] <Derick> filipac: I've closed the ticket with all the information included. I'm off to lunch too now
[12:33:02] <filipac> hmm
[12:33:28] <filipac> why does PHPstorm do not show me that?
[12:33:28] <filipac> haha
[12:33:52] <Derick> filipac: PhpStorm shows me an empty character before the $un in ' $unwind'
[12:33:57] <mitereiter> Hello
[12:34:44] <Derick> hi
[12:34:53] <Derick> filipac: alright, out for lunch - back in ~45
[12:35:46] <mitereiter> I got a version 3.0.2 sharded cluster with 1 config server, I would like to switch the config server to 3 version 4.0 config servers, is this possible?
[12:35:48] <filipac> thanks for the help!
[13:36:31] <mitereiter> can I move config data to new config servers with mongodump?
[13:37:16] <Derick> I think we have procedures on our website
[13:39:35] <mitereiter> yeah, but its not working in my case, I want to move 3.0 config data to 4.0 config servers, if I copy the old physical files the new servers won't start with them
[13:40:44] <mitereiter> I'm not sure if this is even possible, I'm just asking
[13:40:50] <Derick> i'm not sure either
[13:41:08] <Derick> but for upgrading, you need to upgrade version by verison, so 3.0 -> 3.2 -> 3.4 -> 3.6 -> 4.0
[13:41:17] <Derick> (unless you're OK with downtime)
[13:42:52] <mitereiter> the new config server is on a different host, I wanted to skip the sequential upgrading
[13:44:15] <mitereiter> thanks for the info, I think I cant skip the steps in the middle
[13:45:38] <mitereiter> how is the direct upgrade possible with downtime (without losing data)?
[13:46:14] <Derick> mongodump, shut it all down, mongorestore
[13:46:25] <Derick> but, with sharding that's trickier
[13:46:30] <Derick> and I don't know the inns and outs
[13:47:41] <mitereiter> ah, I tought you only meant downtime for the config server
[13:47:46] <cmoneylulz> So I'm doing a find query like Rating.find({ appSlug: 'app' }); but it is returning results for everything that starts with app so both app and apple would match. how do i make this an exact match?
[13:49:04] <mitereiter> that should be an exact match query
[13:50:53] <mitereiter> accidentally you dont have "/" at the begining and at the end of the string?
[13:51:48] <cmoneylulz> no but in my use case the other app im returning that I don't want does have a - after the key word so its more like it returns app and app-2
[13:52:17] <mitereiter> this is a regex query Rating.find({ appSlug: /app/ });
[13:53:46] <mitereiter> what is your version?
[13:55:05] <mitereiter> I would try to replicate your problem
[13:57:39] <mitereiter> on 4.0.2 it seems to function as intended
[13:57:50] <cmoneylulz> Looks like 5.2.13
[13:57:59] <Derick> 5.2.13 is not a version that exists
[13:58:08] <mitereiter> is that your mongo version?
[13:58:29] <cmoneylulz> sorry thats my mongoose version
[14:01:20] <cmoneylulz> we are on 3.6.7 i think
[14:01:20] <mitereiter> can you verify the query with mongo shell?
[14:02:00] <cmoneylulz> yeah ill try that one sec
[14:02:00] <mitereiter> if that's working, than you found a 3rd party problem
[14:10:50] <mitereiter> did it go well?
[14:11:48] <cmoneylulz> yeah i think i had some weird caching issue I restarted everything and I can't replicate it any more so I'll take it
[14:11:58] <cmoneylulz> thanks guys
[14:21:56] <mitereiter> yw
[19:34:04] <DammitJim> did the mongodb service used to be called mongodb and it changed to mongod in Ubuntu?
[22:07:23] <Saw> hi, I have an entity event with type (it's an enum, 5 entries) and last updated date, and I need to query the last 10 documents for each type. how can I do that? is that even possible?
[22:09:06] <kempo> hi all. how can i use $match and $limit together?