Skip to content

fix: rebuild index when clear storage#837

Merged
JohannesMessner merged 8 commits intomainfrom
fix-clear-storage
Nov 25, 2022
Merged

fix: rebuild index when clear storage#837
JohannesMessner merged 8 commits intomainfrom
fix-clear-storage

Conversation

@AnneYang720
Copy link
Copy Markdown
Contributor

@AnneYang720 AnneYang720 commented Nov 23, 2022

Signed-off-by: AnneY [email protected]

Goals:

This PR is related to issue #829 and will rebuild index for Redis and ElasticSearch when _clear_storage is called.

  • change for Redis
  • change for ElasticSearch
  • add related test

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 23, 2022

Codecov Report

Base: 59.97% // Head: 83.40% // Increases project coverage by +23.43% 🎉

Coverage data is based on head (df982f4) compared to base (7ddbb87).
Patch coverage: 94.11% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #837       +/-   ##
===========================================
+ Coverage   59.97%   83.40%   +23.43%     
===========================================
  Files         138      138               
  Lines        7040     7046        +6     
===========================================
+ Hits         4222     5877     +1655     
+ Misses       2818     1169     -1649     
Flag Coverage Δ
docarray 83.40% <94.11%> (+23.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/array/storage/redis/backend.py 93.27% <87.50%> (+21.48%) ⬆️
docarray/array/storage/elastic/backend.py 93.33% <100.00%> (+9.87%) ⬆️
docarray/array/storage/elastic/getsetdel.py 100.00% <100.00%> (+24.19%) ⬆️
docarray/array/storage/redis/getsetdel.py 97.14% <100.00%> (+65.25%) ⬆️
docarray/proto/io/__init__.py 93.22% <0.00%> (+1.69%) ⬆️
docarray/document/mixins/_property.py 85.80% <0.00%> (+1.93%) ⬆️
docarray/document/pydantic_model.py 100.00% <0.00%> (+4.08%) ⬆️
docarray/score/data.py 100.00% <0.00%> (+4.54%) ⬆️
docarray/array/storage/memory/backend.py 100.00% <0.00%> (+5.00%) ⬆️
docarray/array/storage/qdrant/__init__.py 97.05% <0.00%> (+5.88%) ⬆️
... and 71 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AnneYang720 AnneYang720 marked this pull request as ready for review November 24, 2022 08:15
@github-actions github-actions bot added size/s and removed size/m labels Nov 25, 2022
@AnneYang720 AnneYang720 enabled auto-merge (squash) November 25, 2022 13:47
@AnneYang720 AnneYang720 disabled auto-merge November 25, 2022 13:47
@JohannesMessner JohannesMessner merged commit eeaba13 into main Nov 25, 2022
@JohannesMessner JohannesMessner deleted the fix-clear-storage branch November 25, 2022 14:53
guenthermi pushed a commit to guenthermi/docarray that referenced this pull request Nov 28, 2022
* fix: rebuild index of redis when clear storage

Signed-off-by: AnneY <[email protected]>

* refactor: change build index funtion name

Signed-off-by: AnneY <[email protected]>

* fix: rebuild index of elastic when clear storage

Signed-off-by: AnneY <[email protected]>

* test: add tests for getset subindex in store

Signed-off-by: AnneY <[email protected]>

* fix: fix elastic __setstate__ client

Signed-off-by: AnneY <[email protected]>

* refactor: keep _build_client

Signed-off-by: AnneY <[email protected]>

Signed-off-by: AnneY <[email protected]>
guenthermi pushed a commit to guenthermi/docarray that referenced this pull request Nov 28, 2022
* fix: rebuild index of redis when clear storage

Signed-off-by: AnneY <[email protected]>

* refactor: change build index funtion name

Signed-off-by: AnneY <[email protected]>

* fix: rebuild index of elastic when clear storage

Signed-off-by: AnneY <[email protected]>

* test: add tests for getset subindex in store

Signed-off-by: AnneY <[email protected]>

* fix: fix elastic __setstate__ client

Signed-off-by: AnneY <[email protected]>

* refactor: keep _build_client

Signed-off-by: AnneY <[email protected]>

Signed-off-by: AnneY <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants