Replace the deprecated IndexReader APIs with new storedFields() & termVectors()#7792
Conversation
Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
2. Fixed some calling and Tests Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
2. Fixed some calling and Tests 3. Spotless java Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #7792 +/- ##
============================================
- Coverage 71.08% 71.05% -0.03%
+ Complexity 57237 57222 -15
============================================
Files 4758 4758
Lines 269844 269851 +7
Branches 39480 39481 +1
============================================
- Hits 191819 191750 -69
- Misses 61865 61969 +104
+ Partials 16160 16132 -28
|
There was a problem hiding this comment.
Thanks @luyuncheng just a minor comment but looks good to me !
There are no other places we use these 2 deprecated APIs right ?
server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java
Show resolved
Hide resolved
Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
++ Updated |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
|
Apologies @luyuncheng , conflicts :(, needs rebase with main |
…NOThreadLocal � Conflicts: � CHANGELOG.md
Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
update CHANGELOG.md Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
@reta Thanks. i sync upstream master into this branch, fixed conflicts. and run precommit locally seems success. |
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-7792-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4fd6877eef7c9cb0b48268a7505506aeb33278a2
# Push it to GitHub
git push --set-upstream origin backport/backport-7792-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.xThen, create a pull request where the |
|
@luyuncheng sadly automation failed, could you please send manual backport to |
@reta OK, let me do it |
…mVectors() (opensearch-project#7792) * 1. Remove calling deprecated document api Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests 3. Spotless java Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch update CHANGELOG.md Signed-off-by: luyuncheng <luyuncheng@bytedance.com> --------- Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
…mVectors() (opensearch-project#7792) * 1. Remove calling deprecated document api Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests 3. Spotless java Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch update CHANGELOG.md Signed-off-by: luyuncheng <luyuncheng@bytedance.com> --------- Signed-off-by: luyuncheng <luyuncheng@bytedance.com>
…3069) There are multiple PRs in core affecting the security plugin that the security plugin needs to adapt to. - opensearch-project/OpenSearch#7792 - opensearch-project/OpenSearch#8826 - opensearch-project/OpenSearch#8668 I am opening a Draft PR that includes a fix for the Lucene-related test failures which was caused by opensearch-project/OpenSearch#7792 Resolves: #3064 Signed-off-by: Craig Perkins <cwperx@amazon.com>
…pensearch-project#3069) There are multiple PRs in core affecting the security plugin that the security plugin needs to adapt to. - opensearch-project/OpenSearch#7792 - opensearch-project/OpenSearch#8826 - opensearch-project/OpenSearch#8668 I am opening a Draft PR that includes a fix for the Lucene-related test failures which was caused by opensearch-project/OpenSearch#7792 Resolves: opensearch-project#3064 Signed-off-by: Craig Perkins <cwperx@amazon.com> (cherry picked from commit 08d1734)
…mVectors() (opensearch-project#7792) * 1. Remove calling deprecated document api Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests 3. Spotless java Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch update CHANGELOG.md Signed-off-by: luyuncheng <luyuncheng@bytedance.com> --------- Signed-off-by: luyuncheng <luyuncheng@bytedance.com> Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
…mVectors() (opensearch-project#7792) * 1. Remove calling deprecated document api Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests 3. Spotless java Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch update CHANGELOG.md Signed-off-by: luyuncheng <luyuncheng@bytedance.com> --------- Signed-off-by: luyuncheng <luyuncheng@bytedance.com> Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
…mVectors() (opensearch-project#7792) * 1. Remove calling deprecated document api Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * 1. Remove calling deprecated document api 2. Fixed some calling and Tests 3. Spotless java Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * add changelog Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch Signed-off-by: luyuncheng <luyuncheng@bytedance.com> * merge main into branch update CHANGELOG.md Signed-off-by: luyuncheng <luyuncheng@bytedance.com> --------- Signed-off-by: luyuncheng <luyuncheng@bytedance.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
i try to use OpenSearch in production. and in our environment, we have tons of segments, tons of threads, tons of data.
i see there is deprecated API to retrieve document. These API would create many
ThreadLocal StoreFieldsand make jvm can not GC. you can see the example in LUCENE#11987.so i PR the code to replace the deprecated api with new
storefields&termVectorsAPI and reduced threadlocal creation.