followup to #37284 with additional feedback
This commit is contained in:
parent
cae71cddfe
commit
093d4a371c
|
@ -14,8 +14,8 @@ operation performed to a document is assigned a sequence number by the primary
|
||||||
shard that coordinates that change. The sequence number is increased with each
|
shard that coordinates that change. The sequence number is increased with each
|
||||||
operation and thus newer operations are guaranteed to have a higher sequence
|
operation and thus newer operations are guaranteed to have a higher sequence
|
||||||
number than older operations. Elasticsearch can then use the sequence number of
|
number than older operations. Elasticsearch can then use the sequence number of
|
||||||
operations to make sure they never override a newer document version is never
|
operations to make sure a newer document version is never overridden by
|
||||||
overridden by a change that has a smaller sequence number assigned to it.
|
a change that has a smaller sequence number assigned to it.
|
||||||
|
|
||||||
For example, the following indexing command will create a document and assign it
|
For example, the following indexing command will create a document and assign it
|
||||||
an initial sequence number and primary term:
|
an initial sequence number and primary term:
|
||||||
|
|
|
@ -343,13 +343,13 @@ then the operation is executed without any version checks.
|
||||||
|
|
||||||
The above will succeed since the the supplied version of 2 is higher than
|
The above will succeed since the the supplied version of 2 is higher than
|
||||||
the current document version of 1. If the document was already updated
|
the current document version of 1. If the document was already updated
|
||||||
and it's version was set to 2 or higher, the indexing command will fail
|
and its version was set to 2 or higher, the indexing command will fail
|
||||||
and result in a conflict (409 http status code).
|
and result in a conflict (409 http status code).
|
||||||
|
|
||||||
WARNING: External versioning supports the value 0 as a valid version number.
|
WARNING: External versioning supports the value 0 as a valid version number.
|
||||||
This allows the version to be in sync with an external versioning system
|
This allows the version to be in sync with an external versioning system
|
||||||
where version numbers start from zero instead of one. It has the side effect
|
where version numbers start from zero instead of one. It has the side effect
|
||||||
that documents with version number equal to zero cannot neither be updated
|
that documents with version number equal to zero can neither be updated
|
||||||
using the <<docs-update-by-query,Update-By-Query API>> nor be deleted
|
using the <<docs-update-by-query,Update-By-Query API>> nor be deleted
|
||||||
using the <<docs-delete-by-query,Delete By Query API>> as long as their
|
using the <<docs-delete-by-query,Delete By Query API>> as long as their
|
||||||
version number is equal to zero.
|
version number is equal to zero.
|
||||||
|
@ -359,7 +359,7 @@ of async indexing operations executed as a result of changes to a source
|
||||||
database, as long as version numbers from the source database are used.
|
database, as long as version numbers from the source database are used.
|
||||||
Even the simple case of updating the Elasticsearch index using data from
|
Even the simple case of updating the Elasticsearch index using data from
|
||||||
a database is simplified if external versioning is used, as only the
|
a database is simplified if external versioning is used, as only the
|
||||||
latest version will be used if the index operations are out of order for
|
latest version will be used if the index operations arrive out of order for
|
||||||
whatever reason.
|
whatever reason.
|
||||||
|
|
||||||
[float]
|
[float]
|
||||||
|
|
Loading…
Reference in New Issue