Skip to content

Instantly share code, notes, and snippets.

diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index ec8835979cc..aa83986c473 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -419,9 +419,10 @@ buildvariants:
- name: .stitch
- name: secondary_reads_passthrough_gen
- name: server_discovery_and_monitoring_json_test_TG
- - name: .serverless !.multiversion
- distros:
Script:
```
const st = new ShardingTest({shards: {rs0: {nodes: 2}}, config: 1, other: { mongosOptions: {verbose: 3}}});
for (let i = 0; i < 1000; i++) {
st.s.getDB("test").foo.insert({_id: i});
}
let cursor = st.s.getDB("test").foo.find().readPref('secondary');
@EshaMaharishi
EshaMaharishi / debugging_mongodb_gdb.md
Last active April 17, 2023 06:41
Debugging MongoDB with GDB

Debugging MongoDB with gdb

gdb is a command line tool that you can use to examine the state of a (1) terminated or (2) running C or C++ process.

Background: Debugging a terminated process

A process can terminate (uncleanly) for a few reasons, such as triggering a segmentation fault, failing an invariant, or throwing an uncaught exception.

A binary can be compiled so that when a process terminates (uncleanly), the process produces a core dump, which is a file containing a "frozen" record of the state of all threads that existed in the process at the time it terminated.

@EshaMaharishi
EshaMaharishi / decorations_mongodb.md
Last active February 21, 2023 02:28
Decorations in MongoDB

The Decorator Pattern

A Decoration is an object that is stored as part of another object, called the Decorable.

The lifetime of the Decoration is tied to the lifetime of the Decorable. This means the Decoration is constructed when the Decorable's constructor is called, and the Decoration is destructed when the Decorable's destructor is called.

Finally, the decoration can only be accessed through the decorable.

The Decorator pattern is an easy way to add parts to an existing object without changing the object.

###Base scenario:

You add a replica set as a shard, remove it, then add another replica set with the same setName (and therefore shardName, since we enforce those are the same)*.

If a ShardRegistry reload doesn't happen between the removeShard() and second addShard() (they happen every 30 seconds), the config server will use the old RSM during the second addShard().

This means it will target the old shard's hosts for things like validating the new shard, checking for conflicting databases, upserting the shardIdentity document, etc.

###Bug 1

How does Kerberos work?

Overview

Kerberos is an authentication protocol, which means it is a prescribed method for a user to prove their identity to a particular application service over a network.

The set of players in the protocol can be seen as:

  • a client program acting on behalf of a user
  • a centralized service, called the Authentication Server (AS)

Keybase proof

I hereby claim:

  • I am eshamaharishi on github.
  • I am eshamaharishi (https://keybase.io/eshamaharishi) on keybase.
  • I have a public key whose fingerprint is FD5F 2B31 327A 519F EF4B A996 39E1 DDDE 13ED E5A5

To claim this, I am signing this object: