-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fix a race condition in Derived Field parsing from search request #14445
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14445 +/- ##
============================================
+ Coverage 71.42% 71.76% +0.34%
- Complexity 59978 62206 +2228
============================================
Files 4985 5125 +140
Lines 282275 292360 +10085
Branches 40946 42246 +1300
============================================
+ Hits 201603 209814 +8211
- Misses 63999 65261 +1262
- Partials 16673 17285 +612 ☔ View full report in Codecov by Sentry. |
server/src/main/java/org/opensearch/index/mapper/DefaultDerivedFieldResolver.java
Outdated
Show resolved
Hide resolved
c77b334
to
1c6320e
Compare
e80ddba
to
0d8b2cb
Compare
❌ Gradle check result for 1c6320e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for c77b334: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for cdbfb0e: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for e80ddba: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
0d8b2cb
to
3bde396
Compare
Hey @rishabhmaurya based on the past issue here opensearch-project/opensearch-build#2292, force push will not work to trigger the gradle check with commit as github is not able to give the
Adding @getsaurabh02 |
3bde396
to
9d517d7
Compare
❌ Gradle check result for 0d8b2cb: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 9d517d7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
9d517d7
to
cf64569
Compare
Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
cf64569
to
2700d8d
Compare
❕ Gradle check result for 2700d8d: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
…ensearch-project#14445) Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
…ensearch-project#14445) (opensearch-project#14522) (cherry picked from commit 212efd7) Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: kkewwei <kkewwei@163.com>
…ensearch-project#14445) Signed-off-by: Rishabh Maurya <rishabhmaurya05@gmail.com>
Description
flaky test was introduced because of a race condition in derived fields when defined within search request.
Since derived fields are created per
QueryShardContext
andQueryShardContext
instance can be created multiple times for a search request, there is a race condition hitting here. Since we are reusing the parsing logic of mapper for derived fields defined in search requests too, it tries to modify the map passed to it where it tries to remove all keys it has parsed.Related Issues
Resolves #14444
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.