Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2789 Fix rendering issues #1648

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
335 changes: 195 additions & 140 deletions source/auth/auth.md

Large diffs are not rendered by default.

19 changes: 7 additions & 12 deletions source/bson-corpus/bson-corpus.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,29 +339,24 @@ development.

- 2024-01-22: Migrated from reStructuredText to Markdown.

- 2023-06-14: Add decimal128 Extended JSON parse tests for clamped zeros with\
very large exponents.
- 2023-06-14: Add decimal128 Extended JSON parse tests for clamped zeros with very large exponents.

- 2022-10-05: Remove spec front matter and reformat changelog.

- 2021-09-09: Clarify error expectation rules for `parseErrors`.

- 2021-09-02: Add spec and prose tests for prohibiting null bytes in\
null-terminated strings within document field
names and regular expressions. Clarify type-specific rules for `parseErrors`.
- 2021-09-02: Add spec and prose tests for prohibiting null bytes in null-terminated strings within document field names
and regular expressions. Clarify type-specific rules for `parseErrors`.

- 2017-05-26: Revised to be consistent with Extended JSON spec 2.0: valid case\
fields have changed, as have the test
- 2017-05-26: Revised to be consistent with Extended JSON spec 2.0: valid case fields have changed, as have the test
assertions.

- 2017-01-23: Added `multi-type.json` to test encoding and decoding all BSON\
types within the same document. Amended
all extended JSON strings to adhere to the Extended JSON Specification. Modified the "Use of extjson" section of this
- 2017-01-23: Added `multi-type.json` to test encoding and decoding all BSON types within the same document. Amended all
extended JSON strings to adhere to the Extended JSON Specification. Modified the "Use of extjson" section of this
specification to note that canonical extended JSON is now used.

- 2016-11-14: Removed "invalid flags" BSON Regexp case.

- 2016-10-25: Added a "non-alphabetized flags" case to the BSON Regexp corpus\
file; decoders must be able to read
- 2016-10-25: Added a "non-alphabetized flags" case to the BSON Regexp corpus file; decoders must be able to read
non-alphabetized flags, but encoders must emit alphabetized flags. Added an "invalid flags" case to the BSON Regexp
corpus file.
40 changes: 21 additions & 19 deletions source/bson-decimal128/decimal128.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,27 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH

## Terminology

**IEEE 754-2008 128-bit decimal floating point (Decimal128)**:\
The Decimal128 specification supports 34 decimal digits
of precision, a max value of approximately `10^6145`, and min value of approximately `-10^6145`. This is the new
`BSON Decimal128` type (`"\x13"`).

**Clamping**:\
Clamping happens when a value's exponent is too large for the destination format. This works by adding
zeros to the coefficient to reduce the exponent to the largest usable value. An overflow occurs if the number of digits
required is more than allowed in the destination format.

**Binary Integer Decimal (BID)**:\
MongoDB uses this binary encoding for the coefficient as specified in `IEEE 754-2008`
section 3.5.2 using method 2 "binary encoding" rather than method 1 "decimal encoding". The byte order is little-endian,
like the rest of the BSON types.

**Value Object**:\
An immutable container type representing a value (e.g. Decimal128). This Value Object MAY provide
accessors that retrieve the abstracted value as a different type (e.g. casting it).
`double x = valueObject.getAsDouble();`
**IEEE 754-2008 128-bit decimal floating point (Decimal128)**

The Decimal128 specification supports 34 decimal digits of precision, a max value of approximately `10^6145`, and min
value of approximately `-10^6145`. This is the new `BSON Decimal128` type (`"\x13"`).

**Clamping**

Clamping happens when a value's exponent is too large for the destination format. This works by adding zeros to the
coefficient to reduce the exponent to the largest usable value. An overflow occurs if the number of digits required is
more than allowed in the destination format.

**Binary Integer Decimal (BID)**

MongoDB uses this binary encoding for the coefficient as specified in `IEEE 754-2008` section 3.5.2 using method 2
"binary encoding" rather than method 1 "decimal encoding". The byte order is little-endian, like the rest of the BSON
types.

**Value Object**

An immutable container type representing a value (e.g. Decimal128). This Value Object MAY provide accessors that
retrieve the abstracted value as a different type (e.g. casting it). `double x = valueObject.getAsDouble();`

## Specification

Expand Down
83 changes: 46 additions & 37 deletions source/causal-consistency/causal-consistency.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,52 +20,63 @@ The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SH

### Terms

**Causal consistency**\
A property that guarantees that an application can read its own writes and that a later read
will never observe a version of the data that is older than an earlier read.
**Causal consistency**

A property that guarantees that an application can read its own writes and that a later read will never observe a
version of the data that is older than an earlier read.

**ClientSession**

**ClientSession**\
The driver object representing a client session and the operations that can be performed on it.

**Cluster time**\
The current cluster time. The server reports its view of the current cluster time in the
`$clusterTime` field in responses from the server and the driver participates in distributing the current cluster time
to all nodes (called "gossipping the cluster time") by sending the highest `$clusterTime` it has seen so far in messages
it sends to mongos servers. The current cluster time is a logical time, but is digitally signed to prevent malicious
clients from propagating invalid cluster times. Cluster time is only used in replica sets and sharded clusters.
**Cluster time**

The current cluster time. The server reports its view of the current cluster time in the `$clusterTime` field in
responses from the server and the driver participates in distributing the current cluster time to all nodes (called
"gossipping the cluster time") by sending the highest `$clusterTime` it has seen so far in messages it sends to mongos
servers. The current cluster time is a logical time, but is digitally signed to prevent malicious clients from
propagating invalid cluster times. Cluster time is only used in replica sets and sharded clusters.

**Logical time**\
A time-like quantity that can be used to determine the order in which events occurred. Logical time is
represented as a BsonTimestamp.
**Logical time**

A time-like quantity that can be used to determine the order in which events occurred. Logical time is represented as a
BsonTimestamp.

**MongoClient**

**MongoClient**\
The root object of a driver's API. MAY be named differently in some drivers.

**MongoCollection**\
The driver object representing a collection and the operations that can be performed on it. MAY be
named differently in some drivers.
**MongoCollection**

The driver object representing a collection and the operations that can be performed on it. MAY be named differently in
some drivers.

**MongoDatabase**\
The driver object representing a database and the operations that can be performed on it. MAY be
named differently in some drivers.
**MongoDatabase**

**Operation time**\
The logical time at which an operation occurred. The server reports the operation time in the
response to all commands, including error responses. The operation time by definition is always less than or equal to
the cluster time. Operation times are tracked on a per `ClientSession` basis, so the `operationTime` of each
`ClientSession` corresponds to the time of the last operation performed in that particular `ClientSession`.
The driver object representing a database and the operations that can be performed on it. MAY be named differently in
some drivers.

**Operation time**

The logical time at which an operation occurred. The server reports the operation time in the response to all commands,
including error responses. The operation time by definition is always less than or equal to the cluster time. Operation
times are tracked on a per `ClientSession` basis, so the `operationTime` of each `ClientSession` corresponds to the time
of the last operation performed in that particular `ClientSession`.

**ServerSession**

**ServerSession**\
The driver object representing a server session.

**Session**\
A session is an abstract concept that represents a set of sequential operations executed by an application
that are related in some way. This specification defines how sessions are used to implement causal consistency.
**Session**

**Unacknowledged writes**\
Unacknowledged writes are write operations that are sent to the server without waiting for a
reply acknowledging the write. See the "Unacknowledged Writes" section below for information on how unacknowledged
writes interact with causal consistency.
A session is an abstract concept that represents a set of sequential operations executed by an application that are
related in some way. This specification defines how sessions are used to implement causal consistency.

**Unacknowledged writes**

Unacknowledged writes are write operations that are sent to the server without waiting for a reply acknowledging the
write. See the "Unacknowledged Writes" section below for information on how unacknowledged writes interact with causal
consistency.

## Specification

Expand Down Expand Up @@ -412,10 +423,8 @@ resolving many discussions of spec details. A final reference implementation mus

- 2017-10-04: Added advanceOperationTime

- 2017-09-28: Remove remaining references to collections being associated with\
sessions. Update spec to reflect that
- 2017-09-28: Remove remaining references to collections being associated with sessions. Update spec to reflect that
replica sets use $clusterTime also now.

- 2017-09-13: Renamed "causally consistent reads" to "causal consistency". If no\
value is supplied for
- 2017-09-13: Renamed "causally consistent reads" to "causal consistency". If no value is supplied for
`causallyConsistent` assume true.
27 changes: 9 additions & 18 deletions source/change-streams/change-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -1024,23 +1024,19 @@ There should be no backwards compatibility concerns.

- 2022-05-17: Add `wallTime` to `ChangeStreamDocument`.

- 2022-04-13: Support returning point-in-time pre and post-images with\
`fullDocumentBeforeChange` and `fullDocument`.
- 2022-04-13: Support returning point-in-time pre and post-images with `fullDocumentBeforeChange` and `fullDocument`.

- 2022-03-25: Do not error when parsing change stream event documents.

- 2022-02-28: Add `to` to `ChangeStreamDocument`.

- 2022-02-10: Specify that `getMore` command must explicitly send inherited\
`comment`.
- 2022-02-10: Specify that `getMore` command must explicitly send inherited `comment`.

- 2022-02-01: Add `comment` to `ChangeStreamOptions`.

- 2022-01-19: Require that timeouts be applied per the client-side operations\
timeout specification.
- 2022-01-19: Require that timeouts be applied per the client-side operations timeout specification.

- 2021-09-01: Clarify that server selection during resumption should respect\
normal server selection rules.
- 2021-09-01: Clarify that server selection during resumption should respect normal server selection rules.

- 2021-04-29: Add `load-balanced` to test topology requirements.

Expand All @@ -1050,22 +1046,19 @@ There should be no backwards compatibility concerns.

- 2020-02-10: Change error handling approach to use an allow list.

- 2019-07-15: Clarify resume process for change streams started with the\
`startAfter` option.
- 2019-07-15: Clarify resume process for change streams started with the `startAfter` option.

- 2019-07-09: Change `fullDocument` to be an optional string.

- 2019-07-02: Fix server version for `startAfter`.

- 2019-07-01: Clarify that close may be implemented with more idiomatic\
patterns instead of a method.
- 2019-07-01: Clarify that close may be implemented with more idiomatic patterns instead of a method.

- 2019-06-20: Fix server version for addition of `postBatchResumeToken`.

- 2019-04-12: Clarify caching process for resume token.

- 2019-04-03: Update the lowest server version that supports\
`postBatchResumeToken`.
- 2019-04-03: Update the lowest server version that supports `postBatchResumeToken`.

- 2019-01-10: Clarify error handling for killing the cursor.

Expand All @@ -1083,15 +1076,13 @@ There should be no backwards compatibility concerns.

- 2018-05-24: Change `startAtClusterTime` to `startAtOperationTime`.

- 2018-04-18: Add helpers for Database and MongoClient, and add\
`startAtClusterTime` option.
- 2018-04-18: Add helpers for Database and MongoClient, and add `startAtClusterTime` option.

- 2018-04-17: Clarify that the initial aggregate should not be retried.

- 2017-12-13: Default read concern is also accepted, not just "majority".

- 2017-11-06: Defer to Read and Write concern spec for determining a read\
concern for the helper method.
- 2017-11-06: Defer to Read and Write concern spec for determining a read concern for the helper method.

- 2017-09-26: Clarify that change stream options may be added later.

Expand Down
Loading
Loading