-
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
Race condition fix for datetime optimization #10385
Race condition fix for datetime optimization #10385
Conversation
server/src/main/java/org/opensearch/common/time/JavaDateFormatter.java
Outdated
Show resolved
Hide resolved
Compatibility status:Checks if related components are compatible with change cbc2780 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git] |
Gradle Check (Jenkins) Run Completed with:
|
9c7d3ae
to
e12af8d
Compare
Once we get green builds, thanks @CaptainDredge |
Gradle Check (Jenkins) Run Completed with:
|
…y used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]>
e12af8d
to
cbc2780
Compare
Trigerring build again in the hope that flaky test passes |
I’m good merging this if gradle check passes and preconmit fails because of infra |
Gradle Check (Jenkins) Run Completed with:
|
Merging it with failing pre-commit checks to fix issue in |
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]> (cherry picked from commit ad17b38)
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]> (cherry picked from commit ad17b38) Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
…10448) * Added performance improvement for datetime field parsing (#9567) * Added performance improvement for datetime field parsing This adds caching of formatters in case of no explicit format specified for the datetime field in mapping. This also adds `strict_date_time_no_millis` as additional formatter in default date time formats Signed-off-by: Prabhat Sharma <[email protected]> * Refactor DateTimeFormatter Access under featireflag Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> (cherry picked from commit 2965e69) Signed-off-by: Prabhat Sharma <[email protected]> * Race condition fix for datetime optimization (#10385) * Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Prabhat Sharma <[email protected]>
* Race condition fix for datetime optimization Signed-off-by: Prabhat Sharma <[email protected]> * Changed JavaDateTimeFormatter caching of parser from MRU(most recently used) to a simple last used formatter Signed-off-by: Prabhat Sharma <[email protected]> --------- Signed-off-by: Prabhat Sharma <[email protected]> Co-authored-by: Prabhat Sharma <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
This PR fixes a race condition in datetime optimization done under PR #9567
It addresses the case where dateTimeFormatter parser list can be partially read by threads when another thread is modifying it
Related Issues
Resolves #4558
Check List
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.