Open-Source Wikis

/

MongoDB

/

Systems

mongodb/mongo

Systems

This section covers the cross-cutting building blocks that aren't user-visible features but show up everywhere in the codebase. They're shared between mongod, mongos, and jstestshell.

Pages

  • BSON — the binary document format used on disk and on the wire.
  • Transport — the network layer (ASIO, gRPC, named pipes).
  • Executors — task executors, thread pools, batons, and futures.
  • IDL — the YAML-driven interface definition compiler.
  • logv2 — the structured logging system.
  • Fail points — runtime hooks tests use to inject delays and errors.

Other shared infrastructure not covered in dedicated pages but worth knowing:

Subsystem Where One-line summary
Base error handling src/mongo/base/ Status, StatusWith<T>, ErrorCodes registry, Status::OK().
Decorations src/mongo/util/decorable.h Typed slots attached to Service/Client/OperationContext/Collection.
Server parameters docs/server_parameters.md IDL-declared runtime knobs.
OpenTelemetry export src/mongo/otel/ Tracing and metrics export.
Concurrency primitives src/mongo/util/concurrency/ Mutexes, condition variables, latches with diagnostics, RWMutex.
Time and clocks src/mongo/util/clock_source.h Replaceable clock sources for tests.
FTDC (diagnostic data) src/mongo/db/ftdc/ Periodic compressed snapshots of serverStatus/replSetGetStatus.
Watchdog src/mongo/watchdog/ Detects stuck filesystem heartbeats.
Scripting (SpiderMonkey) src/mongo/scripting/ The JS engine used by jstestshell and server-side $function.

The Patterns and conventions page covers how these pieces are typically used in everyday code.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Systems – MongoDB wiki | Factory