PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 10th of June, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:40:08] <aroman> what solutions are folks using for pubsub with mognodb?
[02:01:39] <sprince> is there are disadvantage in mongo to using a sequential number as _id for an unsharded database?
[02:01:57] <sprince> s/are/any
[06:40:09] <pranavk> hi guys, i am getting this error when trying to connect django with mongodb
[06:40:12] <pranavk> AttributeError: 'tuple' object has no attribute 'insert' , anybody ? please help
[07:14:17] <pranavk> is there no way, you can directly use django with mongodb without using pymongo
[12:47:05] <abrkn> how can i see print output from remote commands in the shell (from debugging)?
[12:47:23] <omid8bimo> hello, i have 2 questions. first that i have replicaset of 2 servers. does mongodb replication replicate my file in database (like photos that are saved in gridfs)?
[12:47:58] <omid8bimo> and second, can mongodump export those photos in database as well?
[13:00:06] <ifesdjeen> omid8bimo: 2nd is possible, use mongodump --db <db_name> --collection fs.chunks
[13:01:16] <ifesdjeen> omid8bimo: as reg. first, gridfs supports replication and autosharding, so yes, it will replicate your stufd
[13:01:17] <ifesdjeen> f
[13:02:03] <omid8bimo> mm ok but should i see this fs.chunks collection when i issue "show collections" ?
[13:06:40] <ifesdjeen> omid8bimo: i'm not sure wether you do or do not see it, check out the guide http://www.mongodb.org/display/DOCS/GridFS+Specification
[13:06:57] <ifesdjeen> omid8bimo: By default the prefix is fs., so any default GridFS store will consist of collections named fs.files and fs.chunks.
[13:07:13] <ifesdjeen> if you have different namespace, use it
[16:08:19] <zakdances> does anyone know why update() returns null?
[16:21:26] <hillct> zakdances: did you want it to return the updated values? What's your specific case?
[16:23:01] <zakdances> @hillct no, I just want it to return the _id like it would if you call save() I just figured it out however, that if you set Safe=True parameter, it will return the LastError which is null
[16:23:23] <hillct> ag
[16:23:25] <hillct> ah
[16:34:05] <dr_Poggs> afternoon :)
[16:34:29] <dr_Poggs> it's a good job i don't have much hair, otherwise I'd be tearing some of it out right now
[16:35:03] <dr_Poggs> i have a document called 'schedule' with an array of locations within it
[16:36:04] <dr_Poggs> I'm trying to pick out all records that have a location element matching a particular station (done), with either the 'arrival' field being between A and B, *or* 'departure' between A and B, *or* 'passes' between A and B
[16:36:19] <dr_Poggs> using Mongoid, I have this:
[16:36:31] <dr_Poggs> .where(:locations => { "$elemMatch" => { '$or' => { 'arrival_secs' => { '$gte' => from, '$lte' => to }, { 'departure_secs' => { '$gte' => from, '$lte' => to } } } })
[16:37:51] <dr_Poggs> works well, but sometimes a location doesn't have an "arrival_secs" field - if it's the first location, or it doesn't have a "departure_secs" field if a schedule ends there... or it doesn't have either of them and has a "pass_secs" field if the train runs through that location
[16:38:08] <dr_Poggs> when I put in a clause for pass_secs, I get zero matches
[16:38:15] <dr_Poggs> er.... help? anyone? :)
[17:33:27] <merpnderp> I haven't read much about reporting in Mongo and am looking for what limitations I might run into.
[17:37:29] <tnzr> does anyone use sleepy.mongoose?
[17:37:54] <tnzr> I'm trying to get it working on archlinux but all the dependencies seemed to go into python3 (including pymongo) but sleep.mongoose seems to only support python2
[17:38:14] <squant> Hi, i'm having some trouble with the network when I try to use pymongo. I'm following this tutorial http://api.mongodb.org/python/current/tutorial.html
[17:38:45] <squant> then what happens is pymongo.errors.AutoReconnect: could not connect to localhost:27017: [Errno 8] nodename nor servname provided, or not known
[17:40:17] <squant> does anyone have any suggestions for how to configure my network so that it can connect?
[17:40:53] <dr_Poggs> if you type "telnet localhost 27017" at the shell, what do you get?
[17:41:53] <squant> i get this
[17:41:54] <squant> localhost: nodename nor servname provided, or not known
[17:42:17] <dr_Poggs> ok, try "telnet 127.0.0.1 27017"
[17:42:42] <squant> k
[17:43:50] <squant> now it says Connected to localhost.
[17:44:00] <dr_Poggs> right - are you on a UNIX system?
[17:44:03] <squant> but "telnet localhost 27017" still yields the same response
[17:44:05] <squant> yes
[17:44:14] <dr_Poggs> cat /etc/hosts
[17:44:17] <dr_Poggs> do you have a line such as
[17:44:21] <dr_Poggs> 127.0.0.1 localhost
[17:44:22] <dr_Poggs> in it?
[17:44:46] <squant> i'm getting a No such file in directory
[17:45:09] <squant> (i'm in the very top directory right now)
[17:45:13] <dr_Poggs> right, this might be the cause of your problem :)
[17:45:26] <dr_Poggs> as root, type:
[17:45:30] <dr_Poggs> echo "127.0.0.1 localhost" > /etc/hosts
[17:45:39] <dr_Poggs> which distribution, just out of interest?
[17:47:39] <squant> er...I can't find the release file
[17:47:57] <dr_Poggs> cat /etc/lsb-release <--- does that exist and show anything useful?
[17:48:09] <d1ApRiL> Hi, Does a collection with additional unique index take more performance on insert, than an addition index that is not unique?
[17:50:27] <squant> no such file
[17:50:30] <squant> yikes
[17:51:04] <dr_Poggs> that's not awfully good :|
[17:51:18] <dr_Poggs> you can patch around it by trying to connect to 127.0.0.1 in your Python script rather than "localhost"
[17:51:41] <squant> ok
[17:51:53] <squant> why do you think it would be missing?
[17:52:05] <squant> i'm in my etc folder in my finder window
[17:52:11] <dr_Poggs> you're on a Mac?
[17:52:14] <squant> yeah,
[17:52:31] <squant> i just went to shift-cmd-g and typed /private/etc
[17:53:02] <squant> my hosts file looks like its there
[17:54:55] <dr_Poggs> ok, if you're on a Mac, that's different - you won't have an lsb-release file - that's Linux distributions generally
[17:55:25] <dr_Poggs> and this is the wrong place to try to troubleshoot why you don't have a hosts file - just replace "localhost" with 127.0.0.1 in your Python script and that'll do the same thing
[17:55:58] <squant> alright, thanks for the help
[17:56:41] <dr_Poggs> no pr... oh
[18:00:28] <multi_io> if more than one client simultaneously do db.foo.update( { x : 1 } , { $inc : { x : 1 } } ), is it possible that in the end, x will be no larger than 2?
[18:01:51] <multiHYP> hi all
[18:02:37] <wereHamster> multiHYP: no
[18:02:44] <wereHamster> multi_io: no
[18:02:52] <multiHYP> ?
[18:03:21] <multiHYP> logging is enabled. good to know, thanks for the warning. where can I look up the logs?
[18:04:03] <multiHYP> ooh so nice!
[18:04:49] <multi_io> wereHamster: ok. what difference would a $atomic:1 parameter make, then?
[18:04:54] <multiHYP> akh brb
[18:08:16] <multiHYP> hi again
[18:09:52] <wereHamster> multi_io: http://www.mongodb.org/display/DOCS/Atomic+Operations#AtomicOperations-ApplyingtoMultipleObjectsAtOnce
[18:32:58] <multi_io> wereHamster: reading that section triggered my question :P So $atomic:1 really means isolation?
[18:34:18] <multi_io> I don't understand the difference.
[18:34:46] <multiHYP> $atomic i think causes indexing to speed up lookup
[18:39:58] <lambdanaut> Does anyone have any ideas about how to keep a consistent collection schema?
[18:40:29] <lambdanaut> like in mysql I'd just add a new column and every record in the table will be updated with it. Does Mongodb have an equivalent?
[18:41:44] <wereHamster> no
[18:41:53] <wereHamster> if you need a fixed schema, use mysql
[18:42:28] <lambdanaut> ah ok
[21:51:31] <prodigel> hi all. I need to fetch a list of all emails in a mongo database, preferrably using cli/--eval to redirect the output to a file. Is there an easy way to do this? Thanks.
[23:09:26] <ar_blues> I am trying to implement a map reduce operation on one of my collection. I am using Spring data mongodb. My Map function is in my mapper.js and reducer is in myreducer.js.
[23:09:38] <ar_blues> when I run mongodb.mapreduce(……….)
[23:09:48] <ar_blues> I see the following error on my mongod console
[23:09:55] <ar_blues> JS Error: SyntaxError: missing ; before statement nofile_a:0
[23:10:05] <ar_blues> Been trying to google search this since morning, no luck so far
[23:10:06] <ar_blues> any idea?
[23:13:47] <b0c1> you have nofile_a:0 expression in your mapreduce code?
[23:14:22] <ar_blues> no
[23:14:29] <ar_blues> my map reduce code is pretty simple
[23:14:35] <ar_blues> let me give you a pastie
[23:15:41] <ar_blues> http://pastie.org/4064257
[23:16:08] <ar_blues> from mongod : mr failed, removing collection :: caused by :: 13598 couldn't compile code for: _map
[23:32:30] <b0c1> maybe: with one row? emit(this.field1, { url: this.field2.internalfield });
[23:32:56] <b0c1> but im not sure what is internalfield
[23:33:07] <b0c1> its an embedded document?
[23:35:13] <b0c1> umm yes you try it. but its not supported in this way i think
[23:35:14] <b0c1> https://groups.google.com/forum/?fromgroups#!topic/mongodb-user/vElZwz7NjpE
[23:39:35] <ar_blues> Let me try this out, but i am pretty sure all my documents have the embedded key
[23:39:40] <ar_blues> *embedded document
[23:47:38] <estebistec> so,when updating a doc is there any way to know whether anything actually changed? e.g., if I do only a simple addToSet, is there a way to know whether the add was needed?
[23:52:31] <Baribal> Hi. I've taken a look at the Python driver API for GridFS, and I didn't see support for modifying files, i.e. appending to it. Did I just miss that or is that really lacking?
[23:52:44] <estebistec> so, to give some background on my problem, if I want a denormalized count of a set, then I have to know what addToSet did to know whether or not the inc the counter