PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 3rd of July, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:34:05] <raj> any plan of adding joins to mongodb?
[00:37:38] <LouisT> raj: unlikely
[00:37:47] <raj> k
[07:01:23] <basweshwar> ls
[07:54:00] <Mothership> hello
[07:54:25] <Mothership> anyone here had any experience with the use of c# driver?
[08:21:42] <Ravenheart> Mothership i do
[08:23:00] <Niks2112> test
[08:26:39] <Mothership> Ravenheart have any idea how can I populate mongodb document field with a c# List<myCustomClass>? Can't figure it out.
[08:31:34] <Ravenheart> just add a property to your model of type List<Whatever>
[08:35:30] <rbott> hi folks. does the upgrade part in the official manual still apply (e.g. simply exchange the binaries), if you need to upgrade from 1.8 to 2.4?
[08:38:42] <rbott> if I understand the upgrade docs for 2.0, 2.2 und 2.4 series correctly, the database files are binary-compatible. however, i could not find any information if 1.8 -> 2.4 works directly
[09:03:29] <Mothership_> Ravenheart, http://pastebin.com/VdFkYsQ0 what exactly should I do here?
[09:06:51] <Ravenheart> whats newuser
[09:08:55] <Mothership_> its a mongodb document which i need to update
[09:09:36] <Mothership_> i ran a query, got a document, i need to update it
[09:09:36] <Ravenheart> work with models
[09:11:03] <Ravenheart> http://pastebin.com/WaKfNv44
[09:11:51] <Ravenheart> http://pastebin.com/wDykfUmB
[09:18:18] <Mothership_> Ravenheart, I know how to do queries, the problem is that I have the representation of the document as a class in c#, and when I want to save the c# class object to a document, the strings save fine, for arrays i can do cast (BsonArray) so that works too, but the I cant save list of custom class to mongo as a value of document's property.
[11:10:59] <abhishek> hey geeks
[11:11:17] <abhishek> is it possible ot use mysql+nosql together?
[11:11:36] <abhishek> if yes , any body who can help out ?
[11:14:21] <abhishek> i need to use it for ETL
[11:14:42] <abhishek> any link/ example from where i can figure out ?
[11:15:08] <abhishek> how to glue it together?
[11:24:03] <jekle> abhishek: I saw an orm abstraction library for php that let you combine both. (https://github.com/jenssegers/laravel-mongodb/)
[11:32:02] <netQt> hi all, i'm trying to create replica sets but i keep getting this error "mongod --port 27017 --dbpath /srv/mongodb/rs0-0 --replSet rs0 --smallfiles --oplogSize 128"
[11:32:20] <netQt> does anyone know how to fix this?
[11:32:36] <netQt> replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
[11:33:46] <dawik> hiya
[11:34:10] <kali> netQt: i'm not sure this is an error when you create the RS
[11:34:33] <dawik> im wondering, if there is a convenient way to print/output a BinData object to binary representation? I can only find hex() and base64() methods
[11:34:56] <dawik> from the CLI that is, it is easier via a client :)
[11:35:12] <kali> dawik: not knowing what's insise ? i'm not sure
[11:35:25] <dawik> kali: it is type 0
[11:36:06] <dawik> if it helps
[11:36:24] <kali> dawik: well, 0 is the default, so it can be about anything
[11:39:01] <dawik> kali: well, I do know the general content of what it is that is encoded
[11:39:24] <dawik> if I knew the exact content, why would I need to extract it?
[11:40:56] <dawik> just asking, because to me it would be intuitive to have a binary data class that actually has a method to return binary data
[11:41:07] <dawik> decoded that is
[11:49:16] <dawik> instead i guess i will resort to some third-party snippet to convert base64 to binary
[11:49:28] <dawik> which is less safe and probably less efficient
[11:49:34] <dawik> :(
[12:43:07] <_NiC> Can someone confirm that after setting a keyFile in my config, my replica set will work (as in, be replicated) regardless of what users I add to any of the databases, including the admin db?
[12:43:57] <rspijker> yeh, that should work fine _NiC
[12:44:47] <_NiC> rspijker, great! :)
[12:45:03] <_NiC> Then I just need to figure out what users to add to administrate this whole thing.
[12:47:26] <_NiC> are there any "best practices" when it comes to general admin users, like one with userAdminAnyDatabase, one with clusterAdmin, and so on?
[12:48:46] <rspijker> _NiC: not sure if there are any defined best practices. We alsways just decide which separate roles we need. So does it make sense to split these responsibilities? If so, we do it, otherwise we don’t
[12:51:20] <_NiC> rspijker, It's a fairly small setup with limited number of people having access, so we could do fine with a single user.. My limited experience does not cover what makes sense yet :-)
[12:52:13] <rspijker> we generally have a single userAdmin, a clusterAdmin, instanceAdmin and then users for the separate DBs as makes sense
[12:52:55] <rspijker> so we split them up quite a bit, actually
[12:55:20] <_NiC> Hm, ok. instanceAdmin. *reads about*
[12:57:53] <rspijker> I don’t think that’s an actual mongo thing, just a term we use internally :)
[12:58:18] <rspijker> the clusterAdmin is responsible for the cluster administration, the instanceAdmin controls the replica sets inside of the shards
[13:00:12] <_NiC> Ok, I think that makes sense.. :-)
[13:15:44] <_NiC> When I access the :28017 web interface, what's the role needed for that
[13:15:45] <_NiC> ?
[13:19:03] <_NiC> The docs recommend to disable that for production systems, but I guess it's safe to have it up as long as you have it password protected? Also, can mongo export it on https instead of http? Or do I need to stick something in front of it?
[13:24:23] <rspijker> fairly sure it can’t do http
[13:24:40] <rspijker> no idea what the roles are for the REST interface or how that would even work
[13:24:43] <rspijker> I’ve never used it
[13:24:56] <rspijker> (can’t do https, that is of course)
[13:26:03] <_NiC> there's a few things to click on in there that requires REST... enabled it on my local test, it does provide some useful info
[13:26:11] <_NiC> I think I'll have to look into that a bit more as well
[13:33:30] <_NiC> Docs says for 'nohttpinterface' that "Authentication does not control or affect access to this interface.", but that's actually not the case.. I got a login-popup in my browser when accessing the web interface, and I was able to log in with my userAdminAnyDatabase user..
[13:37:47] <_NiC> How do you do monitoring of mongodb?
[13:45:44] <rspijker> _NiC: MMS and we use Zabbix for the general monitoring
[13:48:57] <_NiC> rspijker, Feel like sharing your zabbix templates? :-)
[13:49:40] <rspijker> the mongo stuff is all from a plugin
[13:50:04] <_NiC> rspijker, mikoomi?
[13:50:06] <rspijker> https://code.google.com/p/mikoomi/wiki/03
[13:50:08] <rspijker> yeh
[13:53:35] <_NiC> I think we're using that already actually.. possibly an old version. Will check out MMS too.
[13:53:38] <_NiC> Thanks. :)
[13:57:15] <rspijker> no worries. Zabbix is good to monitor overall health, in a more general sense. MMS can really help look into health as well as performance metrics
[13:57:41] <ue> hey, do i have to chown /data/db everytime i want to run mongod?? whats the way to do it only once?
[13:58:05] <rspijker> why would you have to chown more than once?
[13:58:14] <rspijker> what is ‘reverting’ it?
[13:58:32] <ue> thats what surprised me to
[13:58:45] <ue> i chown /data/db yesterday on the server
[13:58:52] <rspijker> to which user?
[13:58:53] <ue> after which i cud run mongod
[13:59:01] <ue> i did chow 755
[13:59:14] <rspijker> …
[13:59:18] <rspijker> did you chown, or chmod?
[13:59:27] <ue> first i did chmod
[13:59:37] <ue> then i did chown to my $USER id
[13:59:53] <rspijker> and mongod is running as your own user?
[14:00:08] <ue> what do u mean?
[14:00:25] <ue> someone before me had installed mongodb
[14:00:27] <rspijker> normally, you would have mongod running as it’s own user
[14:00:36] <rspijker> so there would be a mongod user and group
[14:00:43] <rspijker> this is the group you would chown the db files to
[14:00:56] <rspijker> then they can simply be chmodded so that only the owner can access them
[14:00:57] <ue> but if i chmod it to 755, that shud be sufficient right?
[14:01:32] <rspijker> eh… not necesarilly...
[14:01:37] <rspijker> iirc, 5 means read + exec
[14:01:44] <rspijker> so only the owner can read
[14:02:02] <rspijker> so, if your mongod instance is running as any user except for the owner, it won;t be able to write to the db files
[14:03:02] <ue> is there a way to find out whose the owner?
[14:03:37] <ue> if there are other ppl apart from me who has access to the server?
[14:04:35] <rspijker> the owner of what?
[14:04:44] <rspijker> ls -l will show the owner of files and directories
[14:05:16] <ue> so i logged in to the server with my id, so when i do ls -l, i see my name as the owner
[14:05:35] <rspijker> the u flag on ps will show you the user a process is running as
[14:05:52] <rspijker> ok, then apparently you are the owner of that file
[14:06:03] <rspijker> is the mongod process running as your user as well?
[14:17:15] <ue> how can i check that
[14:19:43] <rspijker> ue: the u flag to ps tells you which user a process is running as
[14:19:44] <ue> i did ps aux | grep mongod
[14:19:50] <rspijker> that should do
[14:19:55] <rspijker> *while mongod is running*
[14:20:26] <ue> this is what i got:
[14:20:26] <ue> 1131087 11560 0.2 0.2 362328 37148 pts/0 Sl+ 10:00 0:02 mongod
[14:21:04] <rspijker> ue: which OS is this?
[14:21:26] <ue> linux ubuntu 12.04
[14:22:17] <ue> if i do only ps u, that should tell me all the processes that is running with me as the user, right?
[14:23:08] <rspijker> not exactly, think the default shows only process that have a tty
[14:23:12] <rspijker> that’s where the x comes in
[14:23:29] <rspijker> a means show processes belonging to other users as well
[14:23:37] <rspijker> and u means show user-oriented format
[14:23:46] <rspijker> which, usually…, includes the actual user
[14:23:51] <rspijker> at least, it does for me :/
[14:24:14] <rspijker> what happens if you go ps -ef | grep mongod
[14:24:48] <ue> 1131087 11560 11450 0 10:00 pts/0 00:00:03 mongod
[14:24:48] <ue> 1131087 12151 11929 0 10:22 pts/2 00:00:00 grep --color=auto mongod
[14:25:51] <rspijker> ok, I don’t understand that… that should definitely start with a username
[14:26:14] <ue> lol...i know
[14:26:47] <rspijker> is 1131087 your username?
[14:26:51] <ue> its fine....i think after doing chmod 755, i wont have to chown everytime
[14:26:57] <ue> no
[14:27:08] <ue> my username is of format: firstname.lastname
[14:28:48] <rspijker> ok… so… apparently: If the length of the username is greater than the length of the display column, the numeric user ID is displayed instead.
[14:29:14] <ue> is there a way to check if 1131087 is actually my username
[14:29:46] <ue> yeah that is my userid
[14:30:02] <ue> so that means i do not have to chown everytime right?
[14:30:20] <rspijker> as long as the mongod is running as your user
[14:30:32] <rspijker> and no other process is changing the ownership of that directory
[14:31:29] <ue> coool
[14:31:41] <ue> can u help me with another step
[14:32:15] <ue> is there a way where mongod is always running.....as in i do not have run mongod on one tab, and mongo on another ab
[14:32:16] <ue> tab
[14:35:44] <rspijker> ue: normally one would run mongod as a service
[14:36:07] <rspijker> there probably is an init script for it already (as it is part of the standard install)
[14:36:16] <rspijker> what you could also do, if you;re just testing things
[14:36:19] <ue> this is what i found in the docs: mongod --fork --logpath /var/log/mongodb.log
[14:36:29] <rspijker> is give it the fork command line option
[14:36:40] <rspijker> yeah, that should do
[14:36:55] <rspijker> you might have to change the logpath, since your user might not have rights to write there
[14:37:18] <ue> why do i need give the --logpath option? shudnt there already be one
[14:39:35] <rspijker> ue: if you’re not forking it into the background, it doesn’t log to a file. It just writes to the standard out
[14:39:51] <ue> https://www.irccloud.com/pastebin/dOoAGpQc
[14:39:56] <rspijker> that’s no longer possible when you fork it, so the logs need somehwere to go, so you need to tell it where
[14:40:27] <ue> if u check the link above, i am getting an error when i run the fork command
[14:40:28] <rspijker> did you change the logpath?
[14:40:38] <rspijker> like I said, your user might not have rights to write to that location
[14:40:48] <ue> so sudo?
[14:41:21] <rspijker> just try with: mongod --fork --logpath mongodb.log
[14:41:35] <rspijker> that will write to a logfile local relative to the current dir
[14:41:49] <ue> that worked
[14:42:07] <ue> i know this is more of a unix question....but how can i get the right to write to that location?
[14:42:26] <ue> is there a way i can do it myself or do i need to contact the sys admin to give me the rights
[14:42:45] <rspijker> create the file as a user that has the correct priviliges, then chmod or own it so that you can write to it
[14:43:04] <rspijker> if you have sudo access, then you can just use sudo to create it and change the rights to allow you to write to it
[14:43:23] <red_> Can somebody take a look at this?
[14:43:25] <red_> http://stackoverflow.com/questions/24526797/mongoose-cannot-call-method-findone
[14:43:41] <ue> thank u rspijker.....do u work at mongodb?
[14:43:42] <rspijker> ue: sudo touch /var/log/mongodb.log; sudo chown yourUser:yourUser /var/log/mongodb.log
[14:43:45] <rspijker> nope
[14:44:41] <ue> btw in yourUSER:yourUSER, will it be username:root?
[14:45:27] <rspijker> ue: no, the part after the colon is the group
[14:45:36] <rspijker> normally there is a group for every user as well
[14:45:44] <rspijker> so you can just use your usrname twice
[14:45:59] <ue> oh ok thnx :)
[14:46:24] <ue> right now i left the log in my current directory...that shudnt be a problem right?
[14:47:29] <rspijker> none whatsoever
[15:17:25] <MathiasM> Hi! What's the right way of doing the inverse of populate()? I.e. I want to save a document that should have a link id to another document, but I only have a unique string identifying that document. What's the correct way to lookup (or create) that document before saving the link to it in the first document?
[15:18:34] <MathiasM> can/should I do it in a pre("save") schema action?
[15:18:39] <andrei_> does any one knows how I can reset 2 delete or reset two-factor authentication for mms ?
[15:18:58] <andrei_> does any one knows how I can reset delete or reset two-factor authentication for mms ?
[15:25:53] <tscanausa> having 40 Mongos servers is a nightmare
[15:35:00] <uehtesham90> hey, i have to do a mongodump of a database but i am getting the following error: assertion: 14035 couldn't write to file: errno:27 File too large
[15:35:08] <uehtesham90> is there a way around this
[15:35:25] <uehtesham90> i have sufficient space in my external drive
[15:45:22] <rspijker> uehtesham90: is your external drive formatted in some horrible file system?
[15:45:28] <rspijker> say.. FAT32?
[15:46:15] <uehtesham90> hey rspikjer again :)
[15:46:18] <uehtesham90> i do not know
[15:47:26] <uehtesham90> its ue btw...u helped me before with chown thing in mongod :P
[15:49:25] <rspijker> uehtesham90: I gathered as much :)
[15:49:28] <rspijker> try df -T
[15:49:33] <rspijker> it should tell you the FS on the drive
[15:50:00] <uehtesham90> it says vfat
[15:51:26] <rspijker> bad news
[15:52:03] <rspijker> VFAT is really limited
[15:52:10] <rspijker> one of the limits, is the max file size
[15:52:19] <rspijker> is there other data on that drive
[15:52:21] <rspijker> ?
[15:52:23] <uehtesham90> yes
[15:52:45] <rspijker> ok, so you can’t just reformat it
[15:52:53] <rspijker> well, then you’re kind of out of luck
[15:52:57] <uehtesham90> and the external drive i have as 400 GB of space free....and still u cant transfer the whole file?
[15:53:12] <rspijker> vfat can only handle files up to like 2GB in size
[15:53:31] <uehtesham90> assuming i move the existing data to another storage device, how can i reformat the drive?
[15:54:14] <mehwork> if i have a collection with: {'cars':['bmw':'2014', 'audi':'2003']} how can i use find to query cars.audi = 2003 ?
[15:55:32] <rspijker> uehtesham90: you can use a utility like gparted, probably easiest. There are command line tools as well, but they are a bit more complex if you don’t know too much about this stuff...
[15:56:01] <rspijker> mehwork: almost exactly like that…. db.collection.find({“cars.audi”:”2003”})
[15:56:40] <uehtesham90> what filesystem i shud reformat it to?
[15:56:48] <rspijker> mehwork: ehm… wait… I think I ight have misread that
[15:56:56] <rspijker> uehtesham90: depends, want to use it on windows too?
[15:57:02] <uehtesham90> no
[15:57:04] <uehtesham90> linux
[15:57:06] <mehwork> hmm for some reason it displays the value as "[Object]". does that mean it was stored incorrectly?
[15:57:16] <uehtesham90> (and possibly mac osx)
[15:57:18] <rspijker> uehtesham90: then just etx4
[15:57:27] <rspijker> mehwork: where are you doing this from?
[15:57:38] <mehwork> rspijker: mongo client (command line client)
[15:57:44] <uehtesham90> as an alternate solution, can i store the dump in my dropbox folder?
[15:58:04] <rspijker> probably, if you have the space :/
[15:58:16] <rspijker> it will still also go on your local drive, of course...
[15:58:42] <rspijker> mehwork: what command are you running exactly?
[15:59:23] <uehtesham90> btw whats wrong with the solution u gave for mehwork? looks correct to me
[15:59:44] <mehwork> rspijker: find({}, {cars:1}) for that
[16:00:45] <rspijker> mehwork: ok… then the mongo shell should not just print [Object]
[16:01:29] <rspijker> but your array is… wrong...
[16:01:43] <mehwork> thought so, thanks
[16:01:45] <rspijker> you’re treating it like a document, which it isn't
[16:02:44] <mehwork> is there a builtin way in mongo to convert invalid key names to valid strings? e.g. strip out illegal characters
[16:02:53] <mehwork> or do i need a regex in javascript before inserting to mongo
[16:03:20] <rspijker> either make it something like: {cars: [ {name: “bmw”, year:”2013”}, {name:”audi”, year:”2014”}, …]}
[16:04:00] <rspijker> mehwork: you’re probably best off defining your data structure correctly before inserting
[16:05:00] <rspijker> there’s no or btw… I suggest you just do the either…
[16:06:07] <mehwork> yeah that's what i'm trying to do now
[16:06:50] <rspijker> cool
[16:06:52] <rspijker> I’m off
[16:06:56] <rspijker> good luck guys :)
[16:07:17] <uehtesham90> thnx rspijker.....ur awesome!!!
[16:15:57] <umquant> Could someone give me a little assistance on updating the "values" array in this schema https://gist.github.com/anonymous/3955ecd223979f695d09
[16:58:46] <mehwork> if i have a collection with: {'cars': ['bmw':'2014', 'audi':'2003']}. What should i pass to .find() to see the value of bmw?
[16:59:01] <mehwork> without knowing what the value is, i just want to display the value
[17:01:07] <tscanausa> "cars.bmw"
[17:01:31] <mehwork> .find('cars.bmw') doesn't work though
[17:01:39] <tscanausa> oh you need the exists
[17:01:46] <mehwork> ?
[17:02:29] <tscanausa> { cars.bmw: { $exists: true}}
[17:02:30] <mehwork> .find({'cars.bmw'}) doesn't work though
[17:02:35] <mehwork> ah, trying
[17:03:26] <tscanausa> { 'cars.bmw': { $exists: true}}
[17:04:18] <mehwork> hm that still prints all of the cars array
[17:04:41] <tscanausa> thats how find works. it return the whole document
[17:05:03] <mehwork> but i just want the one value
[17:05:22] <tscanausa> if you dont want that you need projection http://docs.mongodb.org/manual/reference/operator/projection/positional/
[17:07:07] <mehwork> ok thanks
[17:41:55] <umquant> Any idea why a negative slice wouldn't work in a find? For example if I do -5 I still get the first 5 elements
[18:45:30] <denis> Helllo. I am trying to build the mongo-hhvm-driver but I am missing CMakeLists.txt. Does anyone know where to find that file? Thank you.
[18:59:08] <rickibalboa> I have a problem with a findOne call hanging in nodejs. No other calls hang, if I make the call from shell / elsewhere it works fine, just this specific process. Even restarting it doesn't fix anything. Wtf is going on?
[19:00:37] <Zelest> webscale!
[19:13:38] <uehtesham90> hello, im trying to move a mongodb database from one server to another
[19:13:50] <uehtesham90> there are two ways from what i have found
[19:14:00] <uehtesham90> 1) using mongodump and mongrestore
[19:14:49] <uehtesham90> 2) scp the data folder from the datapath directory from current server to the new server
[19:14:55] <uehtesham90> which is the better way??
[19:19:18] <tscanausa> propogation delays between mongos is really annoying
[19:48:26] <gbgbg> hey, how would i drop a collection with a space in the name?
[19:48:30] <gbgbg> i can't seem to do it
[19:49:58] <stefandxm> db.getCollection("....").drop()
[19:49:58] <stefandxm> or so
[19:50:24] <gbgbg> awesome !
[19:50:24] <gbgbg> thanks
[19:50:33] <ehershey> beat me to it
[19:50:34] <ehershey> db.getCollection("with space").drop()
[19:50:44] <cheeser> think she's learned her lesson not use spaces? :)
[19:50:59] <stefandxm> spaces are nice
[19:51:29] <cheeser> sure. but it's like spaces in file names. they just get in the way eventually.
[19:52:07] <stefandxm> it depends how you use the collections
[19:52:16] <stefandxm> for me its a dead storage really
[19:52:20] <stefandxm> so doesnt matter
[19:52:32] <stefandxm> i guess if you are to write manual projections and what not it would be a different thing
[19:52:46] <stefandxm> but with decent intellisense its all the same :)
[19:53:10] <cheeser> yeah. from driver code it doesn't matter overly much. it gets to be a pita in the shell, though.
[20:35:19] <achiang> hello, looking to mongoimport a largish dataset on a single, non-sharded instance. it's going very slowly. i did read that indexing should be turned off to improve performance, but am a bit confused on this point, because i need a unique index, and my data isn't clean (it may have dupes)
[20:36:22] <achiang> so i've been relying on mongo's upsert to clean up this data for me... that is -- on a dupe, just update the record
[20:36:48] <achiang> guessing this probably isn't the best way to do things... looking for advice/pointers
[20:37:50] <cheeser> upserts are going to be slower. it introduces 1 query for each imported row.
[20:38:18] <achiang> that makes sense.
[20:42:41] <achiang> hm... i am doing pre-processing in python already anyway. perhaps i could hash the field i want to be unique. then when encountering a new document, check the hash, and if not exist, write to a new, clean set of data. then pass that to mongoimport, and build an index after
[20:46:03] <achiang> a semi-related question is, what is that "check 9 ..." output telling me at the end of a mongoimport?
[20:56:57] <achiang> oh interesting. /me discovers the dropDups arg to building an index
[21:26:56] <achiang> ok, even more interesting... after some experimentation, on a newly initialized db, and importing 30K records, db.collection.update(<field>, upsert: True) ends up inserting far fewer records vs. db.collection.insert(), even if i have a unique index on <field>
[21:28:06] <achiang> in my experiments, i drop the db inbetween...
[21:28:19] <achiang> any clues why that might be?
[21:43:13] <joannac> achiang: i'm not clear on your testing setup
[21:45:11] <joannac> in particular update() takes 2 arguments, not counting the upsert argument
[21:45:51] <achiang> joannac: well, here is what i'm doing for update() https://github.com/achiang/openmotion/blob/master/data/buses.py#L180
[21:46:56] <joannac> okay
[21:47:03] <achiang> joannac: sorry for speaking sloppily earlier
[21:47:07] <joannac> and for insert, you just insert it again?
[21:47:35] <achiang> joannac: well, i run through the dataset, and get a count of number of new records
[21:48:11] <achiang> joannac: you can see the counting logic on lines 182, 183
[21:48:41] <achiang> joannac: then, to test insert, i drop the collection completely, and just do an insert. one sec, i'll paste that code
[21:50:08] <achiang> joannac: http://pastebin.ubuntu.com/7744134/
[21:50:53] <achiang> joannac: for my experiment, i call mongo_drop(), mongo_index(), and then replace lines 187 -- 193 with the code in the pastebin
[21:51:06] <achiang> joannac: and i get different numbers of inserted records
[21:52:14] <achiang> in the first example: > db.buses.count()
[21:52:14] <achiang> 30979
[21:52:25] <achiang> and in the second, i get: 44794
[21:55:11] <joannac> hmmm
[21:55:11] <achiang> perhaps i am counting incorrectly?
[21:55:11] <achiang> i'm still pretty new to mongo so it's likely i don't know what i'm doing or misinterpreting the docs
[21:57:54] <achiang> or more likely, my update statement is wrong?
[21:59:05] <achiang> hm, i suppose i could easily spotcheck this since mongo is telling me whether it was an update or a new insertion (line 182)
[22:00:14] <joannac> I would just test it on a small dataset
[22:00:26] <joannac> get 2 documents, with the same loc field
[22:00:43] <joannac> runthrough your update code, and your insert code
[22:00:45] <joannac> and spot check
[22:01:06] <achiang> yeah, good idea
[22:01:21] <achiang> something to try after tacos ;)
[22:01:24] <achiang> thanks
[22:02:05] <joannac> also, for compareison, how large is the input?
[22:03:48] <achiang> joannac: what do you mean?
[22:03:59] <achiang> oh... good question
[22:04:10] <achiang> i am not exactly sure right now, but that is a good number to check too
[22:04:14] <achiang> i can find out when i return
[23:23:37] <achiang> how can i find which documents have this duplicate key: "E11000 duplicate key error index: openmotion.buses.$loc_2dsphere dup key: { : \"0f12220001223122\" }"
[23:23:53] <achiang> i'm not exactly sure what i should be searching for
[23:24:47] <achiang> hm... http://stackoverflow.com/questions/17829641/duplicate-key-error-with-mongodb-2dsphere-unique-index
[23:56:52] <seanp2k> so I've been playing with mongodb for all of about an hour now, and I'm wondering if I should do this logic in python or mongo: I have a collection with info on ~100 plugins for an unrelated system. Each plugin has a plugin key, and I want to have a different collection that has a list of keys to ignore (to be used later for alerting based on the results).
[23:57:36] <seanp2k> I could very easily just get the list of ignored keys, get a list of all the keys that match my other criteria, and in python say "remove the ones that match anything in the ignore list".