PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 7th of June, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[17:45:05] <bobinator60> is there a way to get the string value of an OID in an aggregation result? i'm getting this: md: { $oid: "51b2146e0c9bf70017f9fc4d" }, and i'd like md: "51b2146e0c9bf70017f9fc4d" instead
[17:45:17] <bobinator60> i can do it in python....
[17:45:20] <bobinator60> if need be
[18:05:48] <hexacode> anyone know why my update wont work ?? db.Publications.find().update({$set:{link:"NULL"}})
[18:06:11] <hexacode> im trying to set a new property for everything found in Publications Collection
[18:07:02] <hexacode> Fri Jun 7 11:04:24.381 JavaScript execution failed: TypeError: Object DBQuery: test.Publications -> { } has no method 'update'
[18:08:24] <starfly> hexacode: for one, update() isn't a method of find(), so remove find()
[18:09:20] <hexacode> starfly , do you know if i can do something like db.Publications.update({_id:*},{$set:{etc...}})
[18:09:31] <hexacode> i know it wont take the * wildcard
[18:10:38] <starfly> hexacode: if you want all documents, then specify empty _id {}, but best to check all updated related MongoDB doc, since there are parameters which greatly affect the way it works
[18:11:25] <starfly> e.g. db.Publications.update({},{$set:{etc...}})
[18:32:18] <diegows> What does "nscanned:1" in the logs mean?
[18:32:31] <diegows> that operation requires scan or the number of document scanned?
[18:34:11] <starfly> diegobz: http://docs.mongodb.org/manual/reference/method/cursor.explain/
[18:36:12] <diegows> stalled, yes, I read that... but I'm not sure if it has the same meanning in the log file
[18:36:27] <diegows> I have a lot of inplace update that are taking more than 100ms
[18:37:07] <starfly> diegobz: yes, same meaning
[18:37:31] <diegows> ok
[18:38:05] <diegows> what can I do if in place update requires more than 100ms ? I disabled journaling... same problem :(
[18:39:12] <starfly> diegobz: presume you've looked at applicable indexing? That depends on many factors, but try the same with find().explain() to see what help (if any) the update is getting from an index
[18:41:53] <diegows> starfly, yes, checked that
[18:42:06] <diegows> all the nscanner* values are one
[18:42:19] <diegows> and my index is being used
[18:43:39] <starfly> diegows: missed the "1" earlier, OK, what about storage/disk contention, CPU contention, do you just see slow updates or other database operations too?
[18:44:25] <starfly> diegows: is the database/collection small, does the working set fit in physical memory?
[18:45:07] <diegows> there is one big collection which is the more active
[18:45:23] <diegows> around 6M of objects
[18:45:33] <diegows> I process around 50k every minute
[18:45:42] <diegows> and that required an update in the same collection
[18:46:19] <starfly> diegows: so you're performing 50,000 updates a minute in a 6 million document collection?
[18:47:12] <diegows> yes, I walk throught 50.000 docs and I update all of them, every minute, a different set of documents
[18:48:45] <starfly> diegows: OK, you have several options to consider: 1. redesign app logic to reduce updates (if possible) 2. throw hardware at the problem, e.g. SSD 3. shard or is already sharding, add more
[18:49:49] <diegows> starfly, ok... I'm trying with option 1 right now :)
[18:50:07] <starfly> diegows: good option, good luck
[18:50:14] <diegows> starfly, thanks!
[18:51:22] <starfly> :)
[18:55:52] <starfly> diegows: one other thing, you could change your write concern back to the previous default (fire and forget) if data protection isn't a big concern for you, but that should generally be avoided. In any case, it would be good to review what you have in place for write concern: http://docs.mongodb.org/manual/core/write-concern/
[18:56:51] <diegows> yes, I'm using python driver... and already set w=0
[19:06:12] <bobinator60> is there a way to get the string value of an OID in an aggregation result? i'm getting this: { md: { $oid: "51b2146e0c9bf70017f9fc4d" } }, and i'd like { md: "51b2146e0c9bf70017f9fc4d" } instead
[19:18:55] <ehershey> project?
[19:19:55] <ehershey> something like: { $project : { md: "$md.$oid" } }
[19:24:01] <astropriate_> I am having issues building the mongo-hadoop connector for hadoop to talk with mongodb. I am getting [error] impossible to get artifacts when data has not been loaded. IvyNode = org.slf4j#slf4j-api;1.6.4 when trying to use ./sbt package
[19:24:40] <starfly> astropriate_: did you install slf4j-api?
[19:25:14] <astropriate_> starfly, no i haven't
[19:25:18] <astropriate_> let me look that up
[19:26:02] <astropriate_> starfly, shall I install that using a package manager that comes with hadoop? or the distro repos
[19:26:07] <astropriate_> (first time setting up hadoop)
[19:27:11] <starfly> astropriate_: if the package manager allows you to establish that as a dependency (that it will handle), you can go that way, otherwise, install independently
[19:31:24] <astropriate_> i just installed libslf4j-java from my ubuntu repo, yet it is still throwing that error. do I need to do something post-install?
[19:33:43] <starfly> astropriate_: sorry, gotta run, work calling, but will try to help later
[19:34:12] <astropriate_> ok i'll be here :)
[19:48:00] <starfly> astropriate_: what version did you install, at least 1.6.4?
[19:51:41] <astropriate_> starfly, aye, I have 1.6.4
[19:51:49] <astropriate_> it is installed in /usr/share/java
[19:51:58] <astropriate_> which wasn't in my path, and i added it
[19:52:15] <astropriate_> i don't know if there is a directory that it looks in?
[19:52:37] <astropriate_> (adding it to the path didnt' help)
[20:05:01] <starfly> astropriate_: installed in your path mean OS-level PATH env var or JAVA_PATH?
[20:07:33] <starfly> astropriate_: or JAVA_HOME
[20:15:31] <astropriate_> starfly, OS level path
[20:15:36] <n06> I am trying to setup a sharded cluster, and I am receiving the following error ERROR: config servers not in sync! can anyone help me?
[20:15:39] <astropriate_> the two Java ones are empty
[20:19:57] <vargadanis> consider the following document structure: http://pastebin.com/6BVTUC4C
[20:20:07] <vargadanis> how do I push a new element into the array of comments?
[20:21:31] <diegows> faults > 0 in mongostat isn't good, right?
[21:09:59] <vargadanis> I've been trying to query for those posts that have been submitted after a given date... here is a paste how I tried to do it: http://pastebin.com/XXU4r0KL
[21:10:05] <vargadanis> it resulted in nothing!
[21:10:14] <vargadanis> did I screw up something on the query?
[21:11:55] <astropriate_> starfly, if you have time, i set both $JAVA_PATH and $JAVA_HOME to where slf4j is installed (/var/share/java)
[21:12:34] <astropriate_> yet there is no change
[21:43:49] <hahuang65> Asking this in here because #mongoid is pretty dead...
[21:43:54] <hahuang65> In Mongoid 2.x there was a way of sending a query to the primary: Model.where(:network_id => network.id, :email => email).merge(:read => :primary)…. however, upgrading to Mongoid 3, I can't find this functionality anymore… Is there a Mongoid 3 analog to this?
[21:51:40] <starfly> astropriate_: sorry, still chugging away on a prod issue; did you include /usr/share/java or /var/share/java (earlier you indicated /usr…)
[22:11:29] <astropriate_> starfly, no problem. where would I include that? woops that was suppose to be /usr/share/java i had a brain glitch :)
[22:11:42] <astropriate_> also, sbt downloads it just the wrong version
[22:11:57] <astropriate_> [info] downloading http://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.5.11/slf4j-api-1.5.11.jar ...
[22:38:07] <starfly> astropriate_: think this may require hands-on for the right debugging and solution...
[23:08:36] <bobinator60> is there a way to do a $toUpper on an field insdie an array of subdocument? eg { upper_foo : { $toUpper : "$a.foo" } }
[23:08:58] <bobinator60> i get >>> exception: can't convert from BSON type Array to String
[23:09:10] <bobinator60> (which is obvious in hindsight)
[23:13:54] <bobinator60> or can i do another project after i've $unwind'ed the array?