-
Notifications
You must be signed in to change notification settings - Fork 54
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
control-service: introduce data job deployment entity #2659
control-service: introduce data job deployment entity #2659
Conversation
a730a35
to
ec695d3
Compare
Why As part of the VEP-2272 we need to switch the source of truth from Kubernetes to the database. What Implemented a database table named "data_job_deployment," designated for the storage of all data associated with data job deployments. Testing Done Unit tests Signed-off-by: Miroslav Ivanov miroslavi@vmware.com
fbd6974
to
b755be8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I don't think we should have explicit dependencies between deploy table and job definitions table since I want the control service to have more of modular monolith type of architecture ("micro"like services within a single app).
But that's not something that I will block merging over.
Why
As part of the VEP-2272 we need to switch the source of truth from Kubernetes to the database.
What
Implemented a database table named "data_job_deployment," designated for the storage of all data associated with data job deployments.
Note: We've observed a problem where data jobs load slowly because Hibernate executes select n+1 queries. Essentially, Hibernate executes one query to fetch all data jobs and an additional query for each data job to load deployment data. This results in a slow response from the CS APIs that depend on
JobsRepository.findAll()
.To address this issue, we introduced a custom
findAll()
method that retrieves all data jobs and their deployments in a single query.Testing Done
Unit tests
Signed-off-by: Miroslav Ivanov miroslavi@vmware.com