Skip to content
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: workspace from dump may not match the one from yaml #1756

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

JoanFM
Copy link
Member

@JoanFM JoanFM commented Jan 22, 2021

Changes introduced
After refactoring in #1722, it seems that there was a bug when indexers are moved to docker.

The problem is that when the executor is loaded from the mapped volume in docker, the workspace is still in the .bin and although is capable of recreating itself, it tries to fetch the data from the old workspace.

Solution
I propose to have the workspace switched to the workspace folder from where is it loaded as it indicates that it has been "moved" or "mapped into the docker system".

In the long term, I would suggest to get rid of .bin and have a single source of configuration from YAML and have every executor know what to expect

@JoanFM JoanFM requested a review from a team as a code owner January 22, 2021 11:54
@jina-bot jina-bot added size/S area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing component/jaml labels Jan 22, 2021
@codecov
Copy link

codecov bot commented Jan 22, 2021

Codecov Report

Merging #1756 (2056ab0) into master (1fffc52) will decrease coverage by 1.48%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1756      +/-   ##
==========================================
- Coverage   80.86%   79.38%   -1.49%     
==========================================
  Files         135      135              
  Lines        6893     6897       +4     
==========================================
- Hits         5574     5475      -99     
- Misses       1319     1422     +103     
Impacted Files Coverage Δ
jina/jaml/parsers/executor/legacy.py 90.27% <100.00%> (+0.57%) ⬆️
jina/parsers/hub/new.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/helloworld.py 0.00% <0.00%> (-100.00%) ⬇️
jina/helloworld/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
jina/helloworld/components.py 0.00% <0.00%> (-100.00%) ⬇️
jina/helloworld/helper.py 0.00% <0.00%> (-90.53%) ⬇️
jina/parsers/check.py 0.00% <0.00%> (-85.72%) ⬇️
jina/parsers/logger.py 0.00% <0.00%> (-85.72%) ⬇️
jina/parsers/export_api.py 0.00% <0.00%> (-85.72%) ⬇️
jina/jaml/parsers/flow/v1.py 48.14% <0.00%> (-48.15%) ⬇️
... and 49 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fffc52...2056ab0. Read the comment docs.

@github-actions
Copy link

Latency summary

Current PR yields:

  • 🐢🐢 index QPS at 1225, delta to last 3 avg.: -16%
  • 😶 query QPS at 32, delta to last 3 avg.: -1%

Breakdown

Version Index QPS Query QPS
current 1225 32
0.9.19 1221 32
0.9.18 1696 32

Backed by latency-tracking. Further commits will update this comment.

@@ -52,6 +52,12 @@ def parse(self, cls: Type['BaseExecutor'], data: Dict) -> 'BaseExecutor':
if dump_path:
obj = cls.load(dump_path)
obj.logger.success(f'restore {cls.__name__} from {dump_path}')
# consider the case where `dump_path` is not based on `obj.workspace`. This is needed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird line break

@JoanFM JoanFM merged commit d800a58 into master Jan 22, 2021
@JoanFM JoanFM deleted the fix-bug-workspaces branch January 22, 2021 13:13
# consider the case where `dump_path` is not based on `obj.workspace`. This is needed
# for
workspace_loaded_from = data.get('metas', {})['workspace']
workspace_in_dump = getattr(obj, 'workspace', None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have the scenario that workspace is not defined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing component/jaml size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants