[03:05:03] <Evil_Bun_Bun> anyone have 10gen support contact info (phone) we have a support contract but one dba is on an international flight another is camping and we don't have it handy
[03:12:16] <cheeser> if you have a jira login you can file a commercial support ticket and get in touch with someone
[03:12:58] <Evil_Bun_Bun> yeah i don't think we have that either with both dbas out.. normally thats prohibited but one had a camping trip planned months ago another had a death in the family and had to fly to england for the weekend
[04:59:27] <danlamanna> is the password :P - on an application thats local to my machine
[04:59:49] <RaviTezu> cheeser: iirc, you're the one who replied, when I asked the question about syncing a secondary node from another secondary. I did some digging ... and here's the answer:
[04:59:50] <RaviTezu> "rs.syncFrom(hostportstr) make a secondary to sync from the given member"
[05:00:09] <RaviTezu> will let you sync from a specified source. Thanks
[05:26:03] <cheeser> you can kill it but you'll have to restart
[05:27:09] <voidhouse> Hey, how can I get objects that have field x lenght gt than y. Say I want '{ x: 'abc' }, { x: 'ab' }, {x: 'cdef'}' how can I just '.find()' '{x: 'cdef'}'? I want obj.x > 3
[05:27:54] <voidhouse> I know, `.find({ x: { $lg: 3}})` wouldn't work, since it would be looking for a number.
[11:44:57] <Nodex> anyone know how to do synchronous calls with mongodb native? . I have to get data from 3 collections to form some output and I don't want madness callback spaghetti
[12:27:59] <voidhouse> I am using node-native-mongodb and I have `items = db.collections('mycollection').find()' and if I call `items.nextObject` multiple times very fast, I get null objects.
[12:28:11] <voidhouse> And I am pretty sure I am nowhere near the end of the 'collection'
[13:14:31] <Number6> durre: The backup, however, is paid. But you don't need the backup, for testing
[13:21:56] <voidhouse> Any hints or tools that can help me? I just randomly get a batch of 'null'.
[13:28:26] <x0f> voidhouse, does it happen if you throttle your calls to nextObject()? (like in sleeping)
[13:28:56] <voidhouse> x0f: Yes, if I just have one single loop it works.
[13:29:21] <voidhouse> But if I want to have multiple loops, it will give me nulls.
[13:30:45] <x0f> i'm not familiar with node.js, but is uses v8, right? and it is fully multithreading capable, right? could it be a race-condition issue with the underlying mongo-driver?
[13:32:01] <voidhouse> x0f: No, it is actually single threaded and uses an event loop, libuv to be exact.
[13:32:38] <voidhouse> But it seems like a race issue. Maybe I will create an issue over at Github.
[13:36:18] <x0f> voidhouse, so it's callback driven, but your callback method gets an "empty" instead of an "instance" passed?
[13:37:00] <voidhouse> x0f: It gets a 'null' instead of a document.
[13:41:22] <x0f> voidhouse, even the example includes a null-check: https://github.com/mongodb/node-mongodb-native/blob/e5c3ea13a018e5603df3963ac2dae4839bccfb24/examples/cursor.js#L40-L43
[13:43:50] <voidhouse> x0f: Yeah, the null is used to indicte the end of the cursor. But I had another silly mistake. I figured it.
[13:45:42] <voidhouse> instead of creating n loops that repeated until end, I was creating n loops that were creating n loops for ever.
[13:46:10] <voidhouse> That is sure a good recepie for race condtion.
[13:49:31] <x0f> voidhouse, heh, live and learn, i guess.
[14:37:32] <tellnes> and https://github.com/mongodb/js-bson/blob/master/lib/bson/binary_parser.js
[14:54:45] <x0f> i need some help with queryable structed time series data. here is my current case, helpful thoughts/ideas appreciated: http://pastie.org/private/79omiqxkowajzsshrli75g
[17:11:44] <Tomasso_> Im trying the 2dsphere index and when I query , it returns Nothing. I have tried querying on my own collections, and also the following example, that i cannot make it work.. can somebody take a look ? http://pastebin.com/vw22WLx5
[17:16:39] <tham> I have a collection that has to be re-written every once in a while. What I do is db.coll.remove() and db.coll.insert() in that order. But that makes a state where the coll is empty.
[17:16:50] <tham> What's the best way to sort this out?
[17:20:15] <Nodex> you can copy the collection if you want to retain the data
[17:22:35] <tham> Nodex: That sounds good. is there a specific command to copy collections, or do I use the cloneCollection?
[17:26:00] <tham> wonder what happens if the collection I'm copying to exists though
[17:27:21] <tham> perhaps that I should check myself :)
[17:31:27] <tham> perhaps this might be a good idea: db.mycopy.renameCollection("myoriginal", true);
[17:42:20] <Tomasso_> Im trying the 2dsphere index and when I query , it returns Nothing. I have tried querying on my own collections, and also the following example, that i cannot make it work.. can somebody take a look ? http://pastebin.com/vw22WLx5
[18:03:14] <regreddit> trying to do replication between an AWS EC2 instance and a NON EC2 VM, but the maste keeps inserting his private hostname into the config
[18:03:38] <regreddit> how do I get him to insert a public DNS name in the config, so that the other instace can find him?
[18:04:30] <regreddit> as background, AWS instances have private and public IPs and DNS names, but only see their private IP
[18:04:49] <regreddit> so it's not like the mongo instance sees more than one network interface
[18:05:14] <regreddit> I tried forcing it, but it refused the change
[18:15:47] <chaotic_good> how long should rs.inititate() take?
[18:17:49] <Honeyman> Hello. I'm stuck on the problem how to update the field only if it exists.
[18:18:01] <Honeyman> I need to implement the collection of keys, which may or may not have the "count" field. When it has the field, this key is "consumable".
[18:18:09] <Honeyman> And I need to make a query to check if some key is valid.
[18:18:15] <Honeyman> The problem is that when I make findAndModify that validates some key (on "find" phase), what can I do on "modify" phase to decrease the "count" field by one, but ONLY if it exists?
[18:20:24] <Honeyman> When I do findAndModify with "update": {"$inc": {"count": -1}}, it works great with the keys which have the "count" field. But for fields which don't have one, it assumes the value was 0, and sets it to -1.
[18:28:57] <Honeyman> Or maybe, how can I do $inc which doesn't affect the value if it is missing...
[18:32:38] <Derick> Honeyman: do a conditional update?
[18:44:11] <Honeyman> And I need somehow to findAndModify the keys (in a race-condition-prone way) that first and second keys are valid, and the third is not. And after this findAndModify the first key should become (key: 1, count: 0) i.e. invalid,... and the second key must stay {key: 2}, and not become {key: 2, count: -1}
[18:45:20] <Honeyman> count: {$gte: 0} still doesn't match the docs where "count" is missing
[18:50:23] <Honeyman> count: 0 is metaphysically the opposition to "count doesn't exist" :)
[18:51:28] <Honeyman> Cause count: 0 means counter is depleted and the key should not be used, while "count doesn't exist" means there is no counter, and this key never can be depleted...
[18:59:31] <Honeyman> For now, I have the only idea. To consider the key valid if '$or': [{'count': {'$exists': False}}, {'count': {'$ne': 0}}] ($ne rather than $gt). So that the counter of consumable keys will go like 3, 2, 1, 0 (invalid and won't match anymore) and the counter for the infinite keys will go like "doesn't exist", -1, -2, -3... and to add a separate audit the finds all the "count < 0" docs and unsets the "count" field for them...
[19:27:52] <Tomasso_> i cant make find return any results querying on a 2dsphere index.. neither my code, nor in the examples i found.. Im using mongo 2.4.6 , has 2dsphere index support
[19:42:33] <joannac> Tomasso_: Pastebin an example?
[19:45:34] <Tomasso_> i inserted 3 documents to the features collection, created 2dsphere index, ,checked it was created, and then run the .find with no results :'(
[19:46:21] <Tomasso_> and te same happens with a bigger collection of places formatted using GeoJSON Point format that i have
[19:49:29] <Tomasso_> if i do .find() without the location stuff i get results
[19:49:49] <joannac> "If you query for a GeoJSON point, specify $maxDistance in meters."
[19:50:17] <joannac> I think the closest thing you have is still multiple latitude degrees away
[19:50:29] <joannac> a lot more than 50000 metres :)
[19:51:40] <Tomasso_> currently in my other collection i query by : db.mystores.find({location: {$near: {$geometry: casa}, $maxDistance: 50000 } }).pretty()
[19:51:56] <Tomasso_> where casa = { "type" : "Point", "coordinates" : [ -58.417016, -34.603585 ] }
[19:52:12] <Tomasso_> they are real earth locations
[19:53:27] <Tomasso_> i tought it could be the location field, that was not on the json root.. but it isnt, else it would have failed to create the index
[20:20:21] <tystr_> what's an acceptable backfround flush avg value under heavy writes
[20:21:33] <tystr_> also, what tools/strategies do you guys typically use to benchmark/stress test a mongodb replica set
[21:45:32] <regreddit> philosophical question: I was told on #node a few days a go "If you are querying a nosql db that requires and index other than _id you're doing it wrong"
[21:45:45] <regreddit> any comments on that opinion?