[06:42:22] <joannac> aps: that makes no sense. What's the full line?
[06:43:41] <stekla> hi guys. i tried to restore my mongo db with mongorestore, but i got an error: Failed: error connecting to db server: no reachable servers. How i can fix this?
[06:54:43] <aps> joannac: err, I mean I SSHed again
[06:54:46] <joannac> aps: fsyncLock blocks all writes. writes takes precendent over reads. one write when fsyncLocked means no reads will occur. that includes auth
[06:55:08] <aps> joannac: auth is disabled on this mongo
[06:57:36] <joannac> stekla: please follow the syntax in the docs http://docs.mongodb.org/manual/reference/program/mongorestore/
[06:58:03] <joannac> stekla: what you want is mongorestore localhost:27017 -d my_dump my_dump
[06:58:25] <joannac> assuming you want to restore to a db called "my_dump" and the actual dumpfiles are in the current directory in a folder called "my_dump"
[07:32:48] <joannac> stekla: right. why are you running 3.1.7 mongorestore?
[07:32:57] <joannac> can you run the same version as your server?
[07:33:37] <Boomtime> tagrudev: your use of $ positional operator has no match in the query portion, you matched on an exact match of _id - there is no array position for $ to represent
[07:34:47] <aps> joannac: should I just restart the mongo instance?
[07:34:49] <tagrudev> Boomtime, the json is just a single record from the collection
[07:35:06] <tagrudev> which is selected by _id: id
[07:36:27] <Boomtime> tagrudev: if you expect to match _id inside the modifications array then your query should be {"modifications._id":id}
[07:36:28] <tagrudev> Boomtime, look in all available modifications
[07:36:57] <Boomtime> $ means to locate the item that matched the query - it is not magic
[07:36:58] <tagrudev> nah I want to remove a string from the users
[07:37:17] <tagrudev> and I am wondering if there's a way to do so
[07:37:28] <Boomtime> if you match on the top-level _id exactly, then $ has no meaning
[07:38:30] <tagrudev> I see hmm is there a way to acomplish what I am looking for ?
[07:38:41] <Boomtime> you need to include the user match in the query portion so the $ has something to reference
[07:39:49] <tagrudev> wouldn't it match the userId
[07:40:48] <Boomtime> to be honest, i think you'd be better off doing the modification on the client - the result is potentially complex - either that or you would need to run the update multiple times to ensure it hit every match
[07:41:26] <Boomtime> an update with a predicate only matches once - it doesn't keep matching and applying further updates to the same document - it makes exactly one change
[08:28:35] <alaee> Hi guys, is a result of .explain('executionStats) "executionTimeMillisEstimate" : 0 something good?
[08:28:37] <alaee> How should I know I'm doing my queries the right way?
[09:52:10] <aps> Suppose all (two) mongo members in a RS are down for sometime, then they come back but one is in "RECOVERING" state and other is "SECONDARY". How do I make one of them primary?
[09:52:33] <Derick> they'll become primary on their own after recovery has finished
[09:54:15] <aps> Derick: it seems to be stuck in RECOVERING state for quite some time now. How do I make sure there is progress in recovery process?
[09:54:28] <Derick> check the log - it should tell you
[09:54:59] <aps> okay, there's no primary left right now. Does a member still recover when there is no primary?
[09:56:47] <aps> I see lots of these - [rsHealthPoll] replset info x.x.x.x:2701 heartbeat failed, retrying - in the log @Derick
[12:51:30] <deathanchor> always use the packages from the mongodb site, I don't trust the repos to keep up to date.
[12:51:50] <StephenLynx> yeah, but the packages from mongod don't support anything over 14.04 I guess
[13:03:24] <arussel> StephenLynx: it is just my dev machine
[13:03:50] <StephenLynx> I suggest you install a VM with centOS
[14:39:55] <KekSi> any word on the java driver splitting in 2.x and 3.x? is 2.x going to be developed in the future or does it run out soon?
[14:50:11] <fartface> I'm trying to model an ice-hockey team into a MongoDB database, but I'm a bit confused as to how to access nested properties--I've got a pastebin up at http://pastebin.com/3bBL9abf, does anyone know what the best way to handle this would be?
[14:55:31] <fartface> Would that make more sense? I had originally thought about doing it that way, but then in reading around, it sounded like it was more advisable to have it embedded in the related part (the player), but if it's totally fine to have a "Seasons" collection, then I can just do that and insert the player ID
[14:55:32] <StephenLynx> it wouldn't make that much of a difference, either
[14:55:46] <StephenLynx> that depends on how you wish to read the data.
[14:56:03] <fartface> So then I could call it like Seasons.findOne({name: '2015 - 2016', player: (some ID)})
[14:56:19] <StephenLynx> yeah, but you could also just find the player and read its seasons.
[14:56:36] <StephenLynx> in your case, I don't see much of a difference, since there won't be many seasons per player
[14:56:48] <Pinkamena_D> If you don't embed you will have to usually query twice, which looks worse in the code but I have found that there is not much of a performance impact.
[14:57:01] <StephenLynx> yeah, if you have to just query ONCE more
[14:57:30] <StephenLynx> when you have to query N more times, then you really should embed.
[14:57:45] <StephenLynx> having it on a separate collection will impose the following limitation on you:
[14:57:54] <fartface> I wasn't sure whether it'd make more sense to do a second query or to do a loop to get the right season. A second query felt "cleaner", but wasn't sure of performance impact
[14:58:03] <StephenLynx> when you are listing players, it won't work so well if you wish to list them along with season data.
[14:58:26] <StephenLynx> because you will have to "join" the data in application code.
[14:58:40] <fartface> Ah, and that I do. I want to have a "roster" that'll output each players information with their latest season stats
[14:59:47] <StephenLynx> honestly, this whole system suggests a relational database better.
[15:00:01] <StephenLynx> but doesn't seem that bad to use mongo on it either.
[15:00:27] <StephenLynx> you will just have to make compromises and cope with limitations.
[15:01:02] <fartface> Actually that's a pretty good idea. I'll have to think a bit more about how to handle "seasons", in that, let's say that a player plays this season, but not the next. When I create a new season, I guess I'll have some application logic to go through each of the players and push the current season data to an 'archive_season' collection and then null out the 'current' season data
[15:01:33] <StephenLynx> I do something like that on lynxchan
[15:01:53] <StephenLynx> I have a collection with hourly stats and I replicate the hourly stat at given times to the board document.
[15:02:07] <fartface> So that when I go to pull up the current roster, it wouldn't pull up players that played 3 seasons ago and never again or something like that.
[15:14:12] <brianV> Hi all. I'm trying to project hardware requirements for a Mongo deployment. We have about 120gb of data, and we are planning on going to Amazon EC2 and use the Mongo Cloud Manager
[15:14:33] <brianV> what type of instances are normally recommended for Mongo? Better to look at multiple small instances, or one large instance?
[15:14:48] <brianV> What kind of memory requirements are there?
[15:15:46] <StephenLynx> I don't suggest you use amazon
[15:15:53] <StephenLynx> it is much more expensive
[15:17:36] <brianV> StephenLynx: what would you recommend? The rest of our infrastructure is on EC2 already, so we benefit from good internal latency
[15:36:52] <brianV> yopp: oh yeah, we'll be sharding
[15:37:12] <brianV> we have like 500mb of 'static' data, then everything else is records keyed by users, very shardable by userID
[17:03:48] <leev> how can I force a balancer release?
[17:05:18] <leev> I set the wrong shard key on a collection, so tried to stop the balancer and drop the collection, but it has a lock from one of the mongos instances.
[17:05:54] <saml> i have mongo01,02,03, 01 is primary. how can I change primary to 03?
[20:17:00] <deathanchor> I'm getting an assert error with this: var dbo = connect("mongodb://localhost:27017/users?readPreference=secondary");
[20:39:00] <BaNzounet> Hey guys, I've a collection of 1M records, I want to rename a field let's say fooId : { $oid: "aabbcc" } to barId: { $oid : "aabbcc" } what do you advice? Can I use $rename?