PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 16th of May, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[15:01:59] <GothAlice> bson.Decimal128 shares no common base with decimal.Decimal beyond the root ‘object’. (ノಠ益ಠ)ノ彡┻━┻
[15:25:16] <GothAlice> And, well, blow me down. Decimal128(“3.1415926”) !== Decimal(“3.1415926”). Another bson type to reimplement added to the pile. T_T
[15:32:23] <GothAlice> https://github.com/marrow/mongo/commit/cb5fedd46d0de4e2848479b074fa0cb0a02aa2c4 ignoring the comment typo.
[16:59:42] <Quietwalker> Writing some C# code, and I'm curious about initialization. MongoClient.GetDatabase says it will create the database instance if it does not exist. MongoDatabase.GetCollection says it will create the collection implicitly when you write something to it. However, I want to add a TTL index as part of initialization.
[16:59:50] <Quietwalker> Can I create a TTL Index before the collection exists, or will the collection be created (implicitly) when I create the index?
[17:01:14] <Quietwalker> Relevant underlying call: https://docs.mongodb.com/manual/reference/method/db.getCollection/
[17:18:09] <GothAlice> Quietwalker: the database does not exist as a real “thing” until some form of write has been attempted against it. Same for collections. Any write should do, and that includes index construction.
[17:18:21] <GothAlice> It’s also a very quick thing to test out in a mongo shell. ;P
[17:19:13] <Quietwalker> GothAlice: Thanks for the confirmation. I had hoped it would be so, but I figured I'd ask before I started testing due to other issues with our system; AWS hosting, docker, kubernetes, deployment and build through an app, etc.
[17:20:34] <GothAlice> :Microsoft Clippy pops up: “I see you’re working with a kitchen sink!”
[17:20:37] <GothAlice> ^_^;
[17:21:36] <Quietwalker> I will withhold my diatribe about making things run locally first and then never losing that capability, else it makes life hell ...
[17:22:56] <GothAlice> ^ I would agree entirely. I build my apps to be runnable anywhere. They’re honeybadgers. One gaming group forums I wrote they wanted full-text indexing, so I’m like, hey, let me create that index for you… and a week later they had integrated the Solr external search service, and I flipped a table. ;P
[17:23:55] <Quietwalker> Yep, we're also pushing the microservice concept, and I had, yet again, to explain that there's no such thing as safe read only (direct) access to a datastore.
[17:24:59] <Quietwalker> What if I change the format? What if I change the hosting? What if I normalize or de-normalize it? What if I store incomplete values in one table and complete in another to provide partial form data entry saving? What if I do away with that feature?
[17:25:04] <GothAlice> Things are only truly safe if you limit yourself entirely to atomic compare-and-swap updates, and even then, only those individual updates are safe. Have two where ordering matters? Back to where you started. ;^P
[17:31:28] <Quietwalker> Well, if you've got a single service (or a single service cloned many times that know how to behave together), you can completely 'own' the data, and treat everything else as an external consumer to which you provide an external (read and write, potentially) API.
[17:31:45] <Quietwalker> helps keep the intractable dependency goblins away.
[17:32:07] <Quietwalker> so when you change the database, you only change the service. The service is responsible for maintaining backwards compatibility to any client applications then.
[20:52:59] <guardian> will mongo support moe recent versions of json schema?