Package-level declarations

Types

Link copied to clipboard

The database handle every store of Wow reads and writes through: each write acknowledged by a majority of the replica set (w: majority) and each read sent to the primary, both set on the handle so that a client whose default is w: 1 or a secondary read preference cannot weaken them, and each call bounded by its store's timeout (MongoTimeouts). A write the primary acknowledged alone is lost when the primary fails over before it replicates: a reservation (a uniqueness broken), a timer (a command never sent), a checkpoint, a lease, a ledger entry. Snapshots are derivable from the log, but take majority too: one rule for every collection is simpler than an exception that has to stay true. A read from a secondary lags: a state load would read an older version and fail its append as a conflict, and a log, checkpoint, lease or timer read would read behind what this node wrote. The queries' storages take their own read preference (query-read-preference).

Link copied to clipboard
class MongoPoolGauge : ConnectionPoolListener

What a MongoClient's connection pool says of itself, for a MongoDB store's pool (me.ahoo.wow.spi.store.StorePool): the most connections a server's pool opens (maxConnections) and how many check-outs wait now (waiting). The node bounds the store's queries by the first and reads the store's write pressure from the second. One gauge listens to every server pool the client opens: waiting sums their check-outs, maxConnections is one pool's size, the same for each.

Link copied to clipboard

Whether a store shards the collections it creates on a sharded cluster: AUTO when it is connected to a mongos and creates its schema (Ddl.AUTO), NONE for a cluster whose operators shard it themselves. The option sharding of a MongoDB store (wow.mongo.sharding), auto or none.

Link copied to clipboard

How long a store's calls to MongoDB may take (the driver's client-side operation timeout, timeoutMS): without one, a reply lost on the way (a failover, a proxy) blocks its caller forever, the driver's socket reads having no timeout. Every call of the log and the stores has OPERATION unless its store sets another (wow.mongo.operation-timeout); an append has its own, shorter (wow.mongo.append-timeout); the schema's commands (format records, indexes, sharding) have DDL, as an index built over a large collection may take minutes. A call that times out fails as transient (MongoFailures): a write's outcome is then unknown. The queries keep their own budget (maxTimeMS).