PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 9th of August, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:06:23] <near77> hi
[00:06:54] <near77> Has anyone used mongosniff
[00:06:54] <near77> ?
[00:09:10] <stefandxm> judging by previous discussions here today, id say quite a few
[00:13:37] <near77> im having the following issue
[00:16:07] <near77> http://pastebin.com/JAJ0BUbZ
[00:16:17] <near77> do you know what might be happening stefandxm?
[00:19:58] <stefandxm> sorry, i never used mongosniffer
[00:21:29] <near77> mm the error says its in this line
[00:21:29] <near77> verify(messageShouldHaveNs())
[00:21:39] <near77> do you know what Ns might be?
[00:22:46] <stefandxm> never used monogsniffer
[00:22:48] <stefandxm> but
[00:23:00] <stefandxm> first guess; do you have the latest mongosniffer?
[00:23:30] <near77> yes
[00:23:32] <stefandxm> since i guess, a third party tool sniffing a protocol could crash if you get an updated protocol
[00:23:35] <stefandxm> ok
[00:23:39] <near77> i did this to get it
[00:23:48] <near77> git clone https://github.com/mongodb/mongo.git cd mongo scons sniff
[00:25:10] <stefandxm> i cant find the source code that gives this assert
[00:29:22] <near77> its here
[00:29:22] <near77> https://github.com/mongodb/mongo/blob/master/src/mongo/db/dbmessage.cpp#L94
[00:31:16] <stefandxm> https://jira.mongodb.org/browse/SERVER-14843
[00:31:25] <stefandxm> this you?
[00:31:42] <stefandxm> the function?
[00:31:50] <stefandxm> messageShouldHaveNs()
[00:34:06] <near77> yeah
[00:34:08] <near77> just created the jira
[00:34:11] <near77> I need this badly
[00:34:15] <near77> by monday XD
[00:35:28] <near77> just need mongosniff working..
[00:35:37] <near77> I don't know what it could be
[00:35:45] <near77> or maybe a binary version of mongosniff
[00:35:48] <near77> do you know where I can get one?
[01:01:34] <near77> hi
[01:02:03] <stefandxm> no i dont
[01:35:05] <xdotcommer> ensureIndex( { 'products.id':1 }, { unique:true } ); .. does not seem to work with upsert and $push of a product
[02:53:24] <xdotcommer> Trying to do "Unique Restraint on subdocument" but its not working with upsert... ie update( { _id:3, products:[ { id:'123213' } ] } );
[02:53:40] <xdotcommer> does not work with $set modifier
[02:54:19] <xdotcommer> and $addToSet is supposed to work with documents only
[02:56:15] <xdotcommer> I also added uniue index like so ensureIndex( { 'products.id':1 }, { unique:true } );
[02:57:13] <xdotcommer> maybe I am using a wrong operator... I am assuming $push should do it
[02:58:18] <xdotcommer> Basically trying to replicate the suggestion in this Jira https://jira.mongodb.org/browse/SERVER-1176
[03:07:22] <xdotcommer> trying this https://groups.google.com/forum/#!msg/mongodb-user/uaiPPLcjJjY/QpNy54kdokkJ
[04:03:39] <AlexZan> hey guys, with mongoose, what is the difference between creating a schema with: var schema = new mongoose.Schema() vs. var schema = mongoose.Schema() ?
[04:04:59] <stefandxm> what is this mongose?
[04:05:04] <stefandxm> mongoose*
[04:05:21] <stefandxm> (sorry for being genuinely stupid)
[04:05:35] <AlexZan> a module for node, i figured it would be common, my bad if its not
[04:07:39] <stefandxm> sorry i dont know about it
[08:23:00] <kali> AlexZan: it is common. i can't help with node.js stuff, but from what we heard here, mongoose is a safe choice in that weird universe
[08:26:31] <styles> How do you find a regex match that DOES NOT contain a string?
[08:56:16] <kali> styles: field: { $not: /forbidden/ }
[10:31:58] <kosc> Hello. If I need to save a wiki page's content, wich mogno DataType whould be best?
[10:32:04] <kosc> *mongo
[10:34:54] <kosc> Can anyone help me, please?
[10:35:28] <kali> string ? :P
[10:38:41] <kosc> kali: And what is the max length of a mongo string?
[10:39:17] <kosc> I though that max length is 255(256) chars.
[10:39:19] <kosc> No?
[10:39:56] <kali> no.
[10:40:07] <kali> the only limit is the 16MB document size
[10:40:26] <kosc> Oh, good.
[10:40:35] <kosc> kali: Thank's a lot.
[11:16:24] <Lenny[]> I'm wondering if its possible when sorting documents by field, to decide if documents that dont have that field should be first or last, without influencing the sort order of the documents that has the field with ascending/descending ? In SQL i would just use two queries union to this into the same result set.
[13:58:06] <AlexZan> kali, thanks for ur help :D
[14:28:32] <Ampere-> http://stackoverflow.com/questions/6183147/storing-friend-relationships-in-mongodb
[14:28:32] <Ampere-> Do you think that keeping the array with the list of friends into a session is good?
[15:28:33] <AlexZan> what free mongodb options do you guys suggest ? :D
[15:30:15] <cheeser> selfhosting
[15:31:16] <AlexZan> what else :D
[15:33:46] <cheeser> buddyhosting?
[16:55:51] <patrickn> Hello, new mongodb user. A friend sent a database with several .json and .bson files for an application. What's the best way to go about importing these into a database (up and running on debian)?
[16:57:05] <patrickn> I also have robomongo running on mac connected to server where I want to import
[17:06:16] <kali> patrickn: mongorestore. from your mac or the debian
[17:13:21] <patrickn> kali: great thanks, and that will import bson too?
[17:16:59] <kali> patrickn: well, i assume you were given a full database dump. it's a hierarchy of files (the root is likely called "dump") with database as directories, then one bson file for the collection data, one json file for the collection index definition
[17:17:34] <kali> patrickn: if that is the case, just use mongorestore at the top level
[17:18:10] <kali> patrickn: or above the top level, actually :)
[17:18:32] <patrickn> I received a folder named <database> and within are about 5 .json and 5 .bson files
[17:18:43] <patrickn> app is using sails / nodejs
[17:19:20] <kali> yes. mongorestore will slurp it in one run
[17:19:32] <kali> patrickn: just play a bit with it
[17:20:27] <optikalmouse> are people actually using mongoose in production?
[17:20:51] <patrickn> thanks
[17:20:56] <AlexZan> what do you guys prefer, mongohq or mongolab or some other mongo host?
[17:22:36] <patrickn> optikalmouse: I'm using https://github.com/balderdashy/sails-mongo
[17:26:38] <optikalmouse> yeah, I'm pining for a relational db or at least SQL at the moment :/
[17:41:43] <patrickn> kali: thanks I've restored successfully into <database_name>, next step is assigning the database a user and password ( i think)
[18:27:53] <themime> using java, if i have subdoc thats an array, to save it do i need to manually iterate over the items and convert those also to BasicDBObjects?
[18:28:17] <cheeser> an array of what?
[18:29:33] <themime> objects
[18:30:35] <themime> it seems like i need a embedded basicdbobjects which i actually just copy/pasted code for and may have just answered my own question. but if there is a way for it to be converted to a basicdbobject automatically thatd be nice
[18:30:55] <bilb_ono> after I have started switching around with dbs, how can I switch back? I want to switch back to the db named db but when I do use db, it connects to db db, I just want db
[18:31:53] <themime> bilb_ono "use db"
[18:31:59] <themime> if youre in the shell
[18:32:10] <bilb_ono> I get switched to db db
[18:32:13] <themime> oh wait
[18:32:15] <bilb_ono> I want just db
[18:32:19] <themime> i just reread what you wrote and now im confused haha
[18:32:24] <themime> im not sure, still kinda new to mongo
[18:32:37] <bilb_ono> lol at least it didn't switch to db db db
[18:32:43] <themime> why is there a db named db?
[18:32:51] <themime> only default i see is admin and local
[18:33:37] <bilb_ono> i forget. Is there a way to show all db names?
[18:33:43] <themime> show dbs
[18:33:47] <themime> type "help"
[18:33:58] <themime> thats powered 90% of my stuff
[18:34:03] <themime> ive only been using mongo for a few days
[18:35:30] <bilb_ono> Ive ben using it for a collective probably 3 days. spaced wayy to far apart. so I forget everything by the next time I need to use it again
[19:24:34] <near77> hi
[19:24:39] <near77> anyone can help me with mongosniff?
[19:25:05] <near77> I can't have it working, i have this error
[19:25:06] <near77> http://pastebin.com/JAJ0BUbZ
[19:56:49] <huleo> guys, I have a field, simple integer (type: Number), and I want to sort by it
[19:56:51] <huleo> and it works fine
[19:57:05] <huleo> as long as values are not negative
[19:57:28] <huleo> yeah, 'nuff said - "-5" seems to be treated as "5" in sorting
[19:57:41] <kali> what ?
[19:57:50] <huleo> hmm
[19:58:10] <huleo> I'm wondering of mongoose questions fit here or #node.js
[19:58:27] <huleo> .sort({"something": "-1"})
[19:58:36] <huleo> s/of/if
[20:00:01] <kali> use -1 not "-1"
[20:01:30] <huleo> hmm, actually it is -1
[20:01:49] <huleo> sort.({ something: -1 })
[20:02:00] <kali> check that whatever you're sorting on is really stored as integer (from the mongodb shell, not from node)
[20:03:42] <huleo> NumberInt(1) <- example
[20:03:48] <huleo> (rockmongo)
[20:09:38] <huleo> "something" : 1
[20:09:42] <huleo> from mongo shell, just as formality
[20:10:27] <kali> well, if it works in the shell and not in mongoose, i can't hep
[20:10:29] <kali> help
[20:10:41] <kali> you may want to try in #node.js too
[20:29:37] <huleo> hmm
[20:29:48] <huleo> how can I check whether it works in shell?
[20:29:53] <huleo> one sec
[20:31:45] <huleo> yeah, in shell it works just fine
[20:31:52] <huleo> nice mystery
[20:33:40] <near77> hi
[21:34:53] <near77> hi
[21:34:55] <near77> anyone here?
[22:07:13] <tejas-manohar> hey how do i drop the db
[22:09:20] <near77> db.dropDatabase();
[22:09:23] <near77> from the db
[22:23:10] <tejas-manohar> near77: it says false when i try db.dropDatabase();
[22:24:07] <near77> hiiiiiii anyone here?
[22:25:06] <tejas-manohar> near77: yes'
[22:25:39] <near77> hi tejas
[22:25:55] <near77> have you ever used mongosniff
[22:25:57] <near77> ?
[22:55:53] <asturel> hi, im using incorrectly the mongodb c++ driver or valgrind report false-positive memory leak? http://bpaste.net/show/584887/
[22:56:05] <near77> hi
[22:56:08] <asturel> basicly this is the https://github.com/mongodb/mongo-cxx-driver/blob/legacy/src/mongo/client/examples/insert_demo.cpp
[22:59:06] <asturel> i found few valgrind issues kinda same on jira :/
[23:41:17] <huleo> hey
[23:43:40] <huleo> I have problem with simple filtering by date, that's my query: { dateField: { $gte: Date(UNIXTIMESTAMP) } }