This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #664
Does your pull request solve a problem? Please describe:
Like in hyrise/hyrise#2180 described we can not easily load and delete tables while asking at the same time for the meta information. In my opinion, a simple solution for the moment is to stop requesting the meta-information while loading/ deleting the tables. For that reason, I split the jobs in the database object into three categories:
All the background jobs are executed with the Background scheduler (https://apscheduler.readthedocs.io/en/stable/index.html). All the asynchronous jobs are executed with simple python threads (https://docs.python.org/3/library/threading.html#module-threading). Every time we are loading/deleting the tables we are stopping the Background scheduler (We are getting al the meta-information with the background jobs). If the tables are loaded/deleted we are starting the Background scheduler again.
Does your pull request add a feature? Please describe:
To implement the solution and keep the coherence small I wrote three job handlers:
All the handlers are defined in their own classes. The database object has an object from every manager and delegates the requests to the right one.
Affected Component(s):
DatabaseManager
,Database
,jobs
Additional context:
Because this is a bigger change in the architecture of the database object I decided that it would be beneficial to discuss it in a draft first.