[BUGFIX] Add cancellation_time_millis
to resolve Strict Dynamic Mapping issue in .tasks index
#16201
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues
Resolves #16060
Description
[The result of the execution]
StrictDynamicMappingException
occurredCCR Plugin
(cross-cluster-replication), the.tasks
index is properly updated withoutStrictDynamicMappingException
.[Background]
auto follow
rule in the CCR Plugin, aStrictDynamicMappingException
was previously encountered:.tasks
index should be updated.tasks
index has strict dynamic mapping enabled, but thecancellation_time_millis
field is missing fromtask-index-mapping.json
. As a result, this was causing aStrictDynamicMappingException
.[PR contents]
cancellation_time_millis
field totask-index-mapping.json
:StrictDynamicMappingException
from occurring.[Test]
CrossClusterSearchIT
andCrossClusterSearchUnavailableClusterIT
seem to mock virtual clusters rather than deploying real ones.assemble
it, generating theopensearch-min-3.0.0-SNAPSHOT-linux-arm64.tar.gz file
.Dockerfile
, I built aDocker image
. In the same directory as the Dockerfile, I included the following files:opensearch-min-3.0.0-SNAPSHOT-linux-arm64.tar.gz
,opensearch-cross-cluster-replication-3.0.0.0-SNAPSHOT.zip
,opensearch.yml
,opensearch-docker-entrypoint.sh
,opensearch-onetime-setup.sh
Docker Compose
to create two clusters.auto follow
rule and then canceled it to verify the behavior. Set up a cross-cluster connection, get-started-with-auto-follow:StrictDynamicMappingException
occurred. After modifying thetask-index-mapping.json
correctly, I observed that instead of the previousStrictDynamicMappingException
, the task status was successfully updated.Below are the files I used for testing, along with their sources:
My test environment was
Mac OS M2
. If you are using a different operating system, replace the.tar.gz
file with the version that matches your system.If needed, I am happy to provide the
Docker image
used in my test. Please feel free to request it if required.Check List
API changes companion pull request created, if applicable.Public documentation issue/PR created, if applicable.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.