Skip to content

DATAMONGO-2598 - Wording changes #872

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion src/main/asciidoc/new-features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
[[new-features.2-1-0]]
== What's New in Spring Data MongoDB 2.1

* Cursor-based aggregation execution.
* Cursor-based aggregation.
* <<mongo-template.query.distinct,Distinct queries>> for imperative and reactive Template APIs.
* Support for Map/Reduce through the reactive Template API.
* <<mongo.mongo-3.validation,`validator` support for collections>>.
Expand Down
4 changes: 2 additions & 2 deletions src/main/asciidoc/reference/change-streams.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In doubt, use `Document`.

Listening to a https://docs.mongodb.com/manual/tutorial/change-streams-example/[Change Stream by using a Sync Driver] creates a long running, blocking task that needs to be delegated to a separate component.
In this case, we need to first create a `MessageListenerContainer`, which will be the main entry point for running the specific `SubscriptionRequest` tasks.
Spring Data MongoDB already ships with a default implementation that operates on `MongoTemplate` and is capable of creating and executing `Task` instances for a `ChangeStreamRequest`.
Spring Data MongoDB already ships with a default implementation that operates on `MongoTemplate` and is capable of creating and running `Task` instances for a `ChangeStreamRequest`.

The following example shows how to use Change Streams with `MessageListener` instances:

Expand All @@ -39,7 +39,7 @@ container.stop();
<1> Starting the container initializes the resources and starts `Task` instances for already registered `SubscriptionRequest` instances. Requests added after startup are ran immediately.
<2> Define the listener called when a `Message` is received. The `Message#getBody()` is converted to the requested domain type. Use `Document` to receive raw results without conversion.
<3> Set the collection to listen to and provide additional options through `ChangeStreamOptions`.
<4> Register the request. The returned `Subscription` can be used to check the current `Task` state and cancel its execution to free resources.
<4> Register the request. The returned `Subscription` can be used to check the current `Task` state and cancel it to free resources.
<5> Do not forget to stop the container once you are sure you no longer need it. Doing so stops all running `Task` instances within the container.
====

Expand Down
8 changes: 4 additions & 4 deletions src/main/asciidoc/reference/client-session-transactions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ NOTE: `@Transactional(readOnly = true)` advises `MongoTransactionManager` to als
== Reactive Transactions

Same as with the reactive `ClientSession` support, the `ReactiveMongoTemplate` offers dedicated methods for operating
within a transaction without having to worry about the commit/abort actions depending on the operations outcome.
within a transaction without having to worry about the committing or stopping actions depending on the operations outcome.

NOTE: Unless you specify a `ReactiveMongoTransactionManager` within your application context, transaction support is *DISABLED*. You can use `setSessionSynchronization(ALWAYS)` to participate in ongoing non-native MongoDB transactions.

Expand Down Expand Up @@ -249,7 +249,7 @@ Mono<DeleteResult> result = Mono
<1> First we obviously need to initiate the session.
<2> Once we have the `ClientSession` at hand, start the transaction.
<3> Operate within the transaction by passing on the `ClientSession` to the operation.
<4> If the operations completes exceptionally, we need to abort the transaction and preserve the error.
<4> If the operations completes exceptionally, we need to stop the transaction and preserve the error.
<5> Or of course, commit the changes in case of success. Still preserving the operations result.
<6> Lastly, we need to make sure to close the session.
====
Expand Down Expand Up @@ -339,7 +339,7 @@ Inside transactions, MongoDB server has a slightly different behavior.
*Connection Settings*

The MongoDB drivers offer a dedicated replica set name configuration option turing the driver into auto detection
mode. This option helps identifying replica set master nodes and command routing during a transaction.
mode. This option helps identifying replica set manager nodes and command routing during a transaction.

NOTE: Make sure to add `replicaSet` to the MongoDB URI. Please refer to https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options[connection string options] for further details.

Expand All @@ -351,7 +351,7 @@ structures in place.

*Transient Errors*

MongoDB can add special labels to errors raised during transactional execution. Those may indicate transient failures
MongoDB can add special labels to errors raised during transactional operations. Those may indicate transient failures
that might vanish by merely retrying the operation.
We highly recommend https://github.com/spring-projects/spring-retry[Spring Retry] for those purposes. Nevertheless
one may override `MongoTransactionManager#doCommit(MongoTransactionObject)` to implement a https://docs.mongodb.com/manual/core/transactions/#retry-commit-operation[Retry Commit Operation]
Expand Down
2 changes: 1 addition & 1 deletion src/main/asciidoc/reference/jmx.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[mongo.jmx]]
= JMX support

The JMX support for MongoDB exposes the results of executing the 'serverStatus' command on the admin database for a single MongoDB server instance. It also exposes an administrative MBean, `MongoAdmin`, that lets you perform administrative operations, such as dropping or creating a database. The JMX features build upon the JMX feature set available in the Spring Framework. See https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/integration.html#jmx[here] for more details.
The JMX support for MongoDB exposes the results of running the 'serverStatus' command on the admin database for a single MongoDB server instance. It also exposes an administrative MBean, `MongoAdmin`, that lets you perform administrative operations, such as dropping or creating a database. The JMX features build upon the JMX feature set available in the Spring Framework. See https://docs.spring.io/spring/docs/{springVersion}/spring-framework-reference/integration.html#jmx[here] for more details.

[[mongodb:jmx-configuration]]
== MongoDB JMX Configuration
Expand Down
3 changes: 2 additions & 1 deletion src/main/asciidoc/reference/mapping.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ public class Person<T extends Address> {
}

// other getters/setters omitted
}
----

[TIP]
Expand Down Expand Up @@ -784,7 +785,7 @@ class Nested {
[[mapping-usage-references]]
=== Using DBRefs

The mapping framework does not have to store child objects embedded within the document. You can also store them separately and use a DBRef to refer to that document. When the object is loaded from MongoDB, those references are eagerly resolved so that you get back a mapped object that looks the same as if it had been stored embedded within your master document.
The mapping framework does not have to store child objects embedded within the document. You can also store them separately and use a DBRef to refer to that document. When the object is loaded from MongoDB, those references are eagerly resolved so that you get back a mapped object that looks the same as if it had been stored embedded within your controlling document.

The following example uses a DBRef to refer to a specific document that exists independently of the object in which it is referenced (both classes are shown in-line for brevity's sake):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ To gain more control, you might consider `AggregationResult` as method return ty
<8> Like in <6>, a single value can be directly obtained from multiple result ``Document``s.
====

In some scenarios aggregations might require additional options like a maximum execution time, additional log comments or the permission to temporarily write data to disk.
In some scenarios, aggregations might require additional options, such as a maximum run time, additional log comments, or the permission to temporarily write data to disk.
Use the `@Meta` annotation to set those options via `maxExecutionTimeMs`, `comment` or `allowDiskUse`.

[source,java]
Expand Down
Loading