PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 19th of June, 2018

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[10:37:36] <mihaj> Hi, is it possible to have a GridFS enabled per database, and not per mongo[ds] instance?
[10:39:39] <Derick> GridFS is just an API layer implemented by drivers
[10:39:47] <Derick> it's not a *server* feature
[10:44:25] <mihaj> ok, that's interesting. But what is the `storage.engine` config setting used for?
[10:44:46] <Derick> MongoDB supports multiple storage engines: WiredTiger, and still MMAPv1
[10:44:58] <Derick> they store data on disk in specific ways
[10:45:09] <Derick> you probably want to leave it to its default "WiredTiger"
[10:45:22] <mihaj> I'd like to have a GridFS database along with a WiredTiger database on the same mongod instance.
[10:45:34] <Derick> gridfs is on a different level
[10:45:51] <Derick> it's a driver API layer that just uses two collections in a database to store its data
[10:46:12] <Derick> GridFS is fully implemented by drivers, and the server does not know anything about it
[10:46:23] <Derick> for the server, it's just two collections with data
[10:46:42] <mihaj> I see. ok, so what do I have to effectively change in the driver API to set up a GridFS?
[10:46:59] <Derick> You don't need to change anything, you just need to use the GridFS APIs
[10:47:03] <Derick> which driver are you using
[10:47:06] <Derick> ?
[10:47:10] <mihaj> pymongo-based
[10:47:45] <Derick> http://api.mongodb.com/python/current/examples/gridfs.html should have examples
[10:47:51] <Derick> what's your reason for using GridFS?
[10:48:24] <mihaj> Storing larger files.
[10:49:20] <mihaj> Thank you for your help. I really thought this was a storage engine, like WiredTiger.
[10:49:24] <Derick> Like Word documents or something like that?
[10:49:32] <Derick> that's all right, it's what I am here for :)
[10:50:05] <mihaj> Yes. I know that word documents can be compressed, but it's a mix of multimedia files (already compressed) and PDFs etc.
[10:50:42] <Derick> ah, fair enough
[10:50:53] <Derick> that's what GridFS is meant for, so you're all good
[10:51:04] <mihaj> ''b
[11:30:49] <Steve973> Hello. In the java driver, if I want to get the sum of a numeric field in whatever documents are returned from a match, do I do something like Aggregates.project(fields(computed("total", "whatgoeshere???")))
[11:31:46] <Steve973> new DBObject("$sum, "$fieldToSum) <-- is this what goes there?
[11:31:56] <Steve973> with a closing quote, of course
[11:47:52] <dalu> are change streams possible without replica sets?
[11:54:31] <Derick> I don't think so dalu
[11:55:15] <Derick> But I do think you can get away with a single node replica set for it, just like transactions
[11:56:05] <dalu> I found the docs "You can only open a change stream against replica sets or sharded clusters. "
[11:56:20] <dalu> I'm using Go so that complicates things :)
[11:57:24] <dalu> well from an outside perspective... if I monitored changes to the actual files I could probably find if something happened, right?
[11:57:45] <Derick> don't do it... just make it a one-node replica set
[11:58:17] <dalu> but how will mongo find out if there are no other members to compare data to?
[11:58:36] <dalu> find out if something changed*
[12:00:13] <Derick> every operation that is done is stored in an "oplog", and changestreams use that as data source
[12:00:21] <Derick> it doesn't need to compare anything to another server
[12:01:05] <dalu> hmm ok makes sense, but then the replicaset requirement is bogus
[12:01:34] <Derick> no, because the oplog is only made when replication is enabled
[12:01:48] <dalu> I see
[12:01:51] <dalu> thanks :)
[12:44:49] <Gestahlt> Hi
[12:44:58] <Gestahlt> I have a question regarding cluster and ssl/tls
[12:45:15] <Derick> go for it... we might know the answer!
[12:45:25] <Gestahlt> Do i understand it correctly that you put Certificate and private key into a single file?
[12:45:39] <Derick> I believe so
[12:45:45] <Gestahlt> Is that not terribly stupid?
[12:46:03] <Derick> why?
[12:46:23] <Gestahlt> Well usually the key file is different from access rights than the cert file.. at least at our infrastructure
[12:46:51] <Gestahlt> We use FreeIPA to manage auth and certs and i wanted to use it to manage the mongodb certs
[12:47:28] <Gestahlt> Private key and public cert are seperated and now i have to merge them seems so wrong
[12:53:33] <Derick> I'm sorry, but I don't know enough about this to make a qualified comment. If you have any concerns about this, feel free to submit a ticket at https://jira.mongodb.org/browse/SERVER
[17:53:23] <ac_slater> hey guys, newbie here. I have a mongo server with --dbpath set to an XFS formatted SSD. I want to have a backup but I don't want RAID. I think I want a replicaset. Is it stupid to have a replicaset going to a slower disk than the main disk?
[18:01:34] <noocx> hi
[18:47:44] <Derick> ac_slater: replicasets are usually meant to have a mongod on a different machine
[18:54:29] <ac_slater> Derick right
[18:54:49] <ac_slater> in my case, it would be a different container attached to a different disk
[18:54:51] <ac_slater> is that crazy?
[18:55:04] <Derick> no, but it would not really help you if the whole machine dies
[18:55:25] <ac_slater> Derick: right, I'm more concerned about disks, but I get your point
[18:55:39] <ac_slater> maybe a local replica set and then one on AWS or something
[18:57:05] <Derick> make sure to set priority: 0 / hidden: 0 for the remote AWS one though
[18:57:42] <ac_slater> awesome, thanks Derick !
[19:18:39] <Gestahlt> Hi, what is the "clusterFile" in the ssl options?
[19:18:56] <Gestahlt> I mean, i got a CA and Client Cert/Key file
[19:19:05] <Gestahlt> but how do i create a clusterfile and what does it relate to?
[19:19:08] <Gestahlt> its a bit confusing
[20:27:22] <synthmeat> possible to tune ttl background task so i don't get wrecked every 60 seconds? :) like, once per second?
[20:36:26] <Derick> I'm not sure whether it is tunable
[21:27:55] <synthmeat> ack
[23:37:17] <HaZ7> when i login to my cloud9 ide, do i have to start mongodb? or is it already running
[23:37:22] <HaZ7> I'm kind of confused as to how mongodb works
[23:37:34] <HaZ7> i know it's installed... but do i need to run it everytime i start up my ide?