PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Saturday the 5th of July, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:01:54] <rfk> i was thinking about storing most of my personal files in MongoDB but i don't know much about it yet. does this sound like an appropriate use case? my assumption is that every file type i have (eg, PDF, doc, txt, jpeg) has a corresponding mechanism somewhere to extract its relevant features and make them available (and searchable?) as part of Mongo's document structure
[03:02:03] <rfk> is this assumption correct ?
[03:02:33] <rfk> are there 'full-text' search solutions which can use Mongo as a backend?
[04:26:59] <testrpn> test
[13:40:09] <netQt> hi all, i have a question regarding mongos clear database. i have a large database in the live server, and i'm running out of space, so i want to move out the db to another server. the solution i can think of is to remove data after i move it and run databaseRepair.
[13:40:24] <netQt> bu that will bock my db, so i hae to create replica sets
[13:40:55] <netQt> will i have to run repair on all the sets, or only on primary is enough to shrink them all?
[13:41:58] <netQt> the thing is i'm getting a lot of write request, so i can't afford blocking db at any time
[13:44:24] <netQt> any ideas to do it right way?
[13:47:28] <kali> netQt: replica set is the good way to go, it will limit the downtime to a few seconds when you'll restart the standalone with the replica set option
[13:47:42] <kali> netQt: make sure you have enough room for the operation log, though
[13:49:03] <kali> netQt: the "new" replica will import the data compressed, do you will not need to run repair on them immediately
[13:50:01] <netQt> oplog keeps growing or it will empty when all sets are up to date with the primary?
[13:50:14] <kali> it's a fixed size buffer
[13:51:04] <netQt> can i assume when i run repair on primary, new election will held? since primary will be locked for some time?
[13:53:08] <kali> netQt: once you have a replica set working, it's often easier to perform a full resync than a repair
[13:53:42] <netQt> full resync??
[13:54:50] <kali> yes, stop the node you want to defragment, drop the files in dbpath, and start it again.
[13:56:27] <netQt> but i will loose data, since it keeps coming always
[13:57:04] <netQt> that's why i need secondary to replace master when it's bing shrinked
[13:57:16] <kali> when you stop the current primary, the replica set elects a new one, so your cluster come back online after a few seconds
[14:10:41] <netQt> i can keep running repair on primaries in order to shrink the rest of the set(since running repair on the primary will not affect secondaries), although i cant be sure that i will shrink all of them, since there is no guarantee that all secondaries will become primary during the elections
[14:12:34] <netQt> or maybe i can keep reference to all the sets and call repair sequentially
[19:27:32] <RageYL> hi =)
[19:28:06] <RageYL> i would like to do a subquery in an update statement
[19:28:37] <RageYL> somethime like: update blabla = (select a from blabla), blibli = (select...)...
[19:29:03] <RageYL> can you give me some advice or some doc
[20:39:50] <mehwork> i have a collection like: { dealer: 'hondaSF', cars: { [{year: 2010, model: 'CRV'}, {year: 2010, model: 'Accord'] } }. How can I query the dealership 'HondaSF' and only return the models?
[20:46:19] <mehwork> I meant: {dealer: 'hondaSF', cars: [{year: 2010, model: 'CRV'}, {year: 2010, model: 'Accord'}]}
[21:00:31] <riobe> You might be able to pull that off with the aggregation framework using the $unwind operator.
[21:00:39] <mehwork> this only found the first match: db.cars.find({dealer:'hondaSF'}, {cars: { $elemMatch: {'model': {$exists: true}}}})
[21:00:48] <riobe> Not sure how to project partial objects out of an array otherwise.
[21:01:18] <mehwork> do you know if mongoose has any convenience methods for this?
[21:02:20] <riobe> mehwork: http://mongoosejs.com/docs/api.html#aggregate-js
[21:02:34] <mehwork> thanks
[21:02:48] <riobe> You're welcome. :)