-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add support for Elastic Search _shard_doc equivalent #18924
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
Add support for Elastic Search _shard_doc equivalent #18924
Conversation
- Implements ShardDocSortBuilder + comparator - TODO: Add unit + integ tests - Registers in SearchModule Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com>
Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com>
|
❕ Gradle check result for 7199347: 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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #18924 +/- ##
============================================
+ Coverage 72.81% 72.95% +0.14%
- Complexity 69801 69925 +124
============================================
Files 5674 5676 +2
Lines 320850 320935 +85
Branches 46383 46398 +15
============================================
+ Hits 233638 234153 +515
+ Misses 68264 67842 -422
+ Partials 18948 18940 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@laminelam can we add any microbenchmark for it? |
|
❌ Gradle check result for a719fb7: 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 a719fb7: 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? |
|
Thanks @laminelam, this PR is very close to merge, but seems the code test coverage is low, could you add more some unit tests? |
|
Thanks @laminelam , we are preparing the new release version (3.3.0) which the planned code freeze is Sep 30. Do you have a chance to fix the test coverage check ASAP? |
Hi @LantaoJin & @gaobinlong |
|
Hi |
add more test cases Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com>
|
❌ Gradle check result for 60f438d: 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? |
|
@laminelam, will all PIT search requests add an implicit Example 1:will sort by Example 2will sort by |
server/src/test/java/org/opensearch/action/search/SearchRequestTests.java
Show resolved
Hide resolved
Thought of doing it, actually did it and reverted it back, because I am little bit hesitant to implicitly tie a stable proven feature (PIT) to a newly introduced one (shard_doc sorting) in a single PR. I am thinking we better give the user the option to use PIT without shard_doc and at some point we can make it implicit in a separate PR. I think this is a safest path to avoid breaking anything and also make it backwards compatible. What are your thoughts? |
Make sense, LGTM. |
New feature or enhancement won't be backported to 2.19, only bug fix and security issue fix PR can be backported. |
|
❕ Gradle check result for 60f438d: 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. |
…ect#18924) * add a new sort tiebreaker based on shard id and docid - Implements ShardDocSortBuilder + comparator - TODO: Add unit + integ tests - Registers in SearchModule Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add a new sort tiebreaker based on shard id and docid Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add a test class plus some refactoring Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add microbenchmark Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * spotless Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * spotless Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add yaml rest test cases Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * change log Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * some changes to the shard_doc yaml rest test file Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * Add PIT param to ShardDocFieldComparatorSourceIT's search requests Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add more logic for shard_doc parsing add more test cases Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> --------- Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> Co-authored-by: Lamine Idjeraoui <lidjeraoui@apple.com>
…ect#18924) * add a new sort tiebreaker based on shard id and docid - Implements ShardDocSortBuilder + comparator - TODO: Add unit + integ tests - Registers in SearchModule Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add a new sort tiebreaker based on shard id and docid Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add a test class plus some refactoring Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add microbenchmark Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * spotless Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * spotless Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add yaml rest test cases Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * change log Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * some changes to the shard_doc yaml rest test file Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * Add PIT param to ShardDocFieldComparatorSourceIT's search requests Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> * add more logic for shard_doc parsing add more test cases Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> --------- Signed-off-by: Lamine Idjeraoui <lidjeraoui@apple.com> Co-authored-by: Lamine Idjeraoui <lidjeraoui@apple.com>
Implements a new ShardDocSortBuilder and ShardDocFieldComparatorSource to allow sorting by shard id and global doc id as a tie-breaker.
Resolves 17064
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.