[11:05:11] <chris_99> Hi, i'm just wondering, i assume it's not possible to read a mongodb bson file, back to front?
[11:55:20] <GothAlice> chris_99: BSON is essentially a packed C structure. You could theoretically read it in whichever direction you want. With the rider that you can't really read strings backwards, given they're C-style AND Pascal-style. (Null-terminated, length-prefixed.) No trailing marker indicating how far back to move from the end, vs. the opposite.
[11:58:03] <GothAlice> Does raise the question: why on Earth would you need or want to do that? And: how would you parse: ➤>"foo": 27, "bar": [1, 2, 3<<< (between the ><'s) That's partial JSON, and poses a similar problem to "reading backwards". It's not syntactically valid, how could it be parsed at all?
[12:01:32] <chris_99> cheers. that makes sense. I was thinking of how i could roughly get near the end records of a 700MB bson file, but i found now i can just use mongodump to extract only records after a certain date, which cut down the file size to what i need
[15:18:11] <Beldramma> hi everybody ! do you know how to run mongodb on buildroot ?
[15:23:22] <Beldramma> i am on a raspberry so i cannot use mongo shell, i have only mongos and mongod
[15:25:58] <GothAlice> Beldramma: https://gist.github.com/amcgregor/c33da0d76350f7018875 is an ancient (at this point) “cluster in a single box” setup script for testing sharded replica setups. You don’t need a mongo shell on the server, you should be able to use one from your workstation to connect, when needed, though it’s always best to have a complete set of tools installed.
[15:26:28] <GothAlice> (This setup script assumes it can use “mongo” to execute commands needed for the setup, though.)
[15:27:26] <GothAlice> That’s actually a good question: how did you get mongod/mongos installed without the mongo shell?
[15:47:08] <GothAlice> Beldramma: That script will “spin up” and configure two replica sets each of three mongod nodes (“high availability”), then shard the two replica sets together (allowing data to be divided between the two sets based on “sharding key”) and spin up a mongos query router to mediate clients.
[15:47:42] <GothAlice> Note that because all of this is happening on a single machine, it’s not high-availability, or reliable, or durable; this is primarily for testing purposes.
[15:51:42] <GothAlice> It’s a “shell script”, meaning effectively a transcript of what you might write into a Linux shell. To “run” it would require downloading a copy, then marking it as executable (chmod +x), then invoking it, e.g.: ./cluster.sh
[15:52:22] <GothAlice> Being a transcript of commands to run, it’s meant as much as a reference or guide to read, as an actual command to run. (Mentioned it’s old, it hasn’t been tested in years. Might not even still work, though it probably should.)
[20:15:08] <miceiken> Hey, guys. This question is specific to the MongoDB.Driver for .NET. I'm trying to make sure that an Identifier (username, email, phone#) is unique for an Account. I'll have to query an embedded document, similarly to what is done here https://docs.mongodb.com/manual/tutorial/query-array-of-documents/ but I am having a hard time achieving this with a FilterDefinition in the driver
[20:55:19] <warrshrike> E QUERY [thread1] Error: Invalid port number "//cluster0-rkv2m.mongodb.net" in connection string "mongodb+srv://cluster0-rkv2m.mongodb.net/test" :