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

[server] Create columns for product details #3382

Merged

Conversation

csordasmarton
Copy link
Contributor

Create separate columns for products to store the number of runs and
the latest storage date instead of connecting and getting these
information from each product database.

@csordasmarton csordasmarton added database 🗄️ Issues related to the database schema. test ☑️ Adding or refactoring tests server 🖥️ usability 👍 Usability-related features labels Jul 15, 2021
@csordasmarton csordasmarton added this to the release 6.17.0 milestone Jul 15, 2021
@csordasmarton csordasmarton requested a review from bruntib July 15, 2021 12:38
nullable=True))

try:
product_con = op.get_bind()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another solution could be if we will set these data after the server starts. That way if we failed to connect to a database during migration or something is not properly set (race condition -> I think it is not possible, because we are changing the number of runs with one query but who knows) we will still be able to set these data to the correct value. What do you think @bruntib?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I think this is fine during migration, so this data is computed only once. Moreover such errors can happen at server start too.

@csordasmarton csordasmarton force-pushed the improve_product_list_performance branch 2 times, most recently from 81113ae to ecfe66a Compare July 15, 2021 14:36
@csordasmarton csordasmarton added the WIP 💣 Work In Progress label Jul 16, 2021
@csordasmarton csordasmarton force-pushed the improve_product_list_performance branch from ecfe66a to 928484f Compare July 27, 2021 10:34
@csordasmarton csordasmarton removed the WIP 💣 Work In Progress label Jul 27, 2021
@csordasmarton csordasmarton force-pushed the improve_product_list_performance branch from 928484f to 1d12e0b Compare August 5, 2021 13:31
Copy link
Contributor

@bruntib bruntib left a comment

Choose a reason for hiding this comment

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

Removing "currently stored runs" column is intentional, right?

@@ -1189,7 +1191,7 @@ def store(self) -> int:
self.__name, run_lock.locked_at)

# Actual store operation begins here.
run_id = self.__add_checker_run(
run_id, update_run = self.__add_checker_run(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe __add_or_update_run() is a better name instead of __add_checker_run().

nullable=True))

try:
product_con = op.get_bind()
Copy link
Contributor

Choose a reason for hiding this comment

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

No, I think this is fine during migration, so this data is computed only once. Moreover such errors can happen at server start too.

Create separate columns for products to store the number of runs and
the latest storage date instead of connecting and getting these
information from each product database.
Rendering too many components in the product list page in a single row
can really slow down the rendering. For this reason with this patch
we will introduce a client side pagination, so we will not show all the
product in one round.
@csordasmarton
Copy link
Contributor Author

@bruntib What do you mean under removing "currently stored runs". We do not remove any columns from the database with this patch.

@csordasmarton csordasmarton force-pushed the improve_product_list_performance branch from 1d12e0b to 3f1d0a6 Compare August 17, 2021 07:01
@csordasmarton csordasmarton requested a review from bruntib August 17, 2021 07:01
@bruntib
Copy link
Contributor

bruntib commented Aug 17, 2021

I didn't mean database column but "Run store in progress" column on GUI.

@csordasmarton
Copy link
Contributor Author

Yes, I removed it, because it's not an important information from the user perspective and also we are not using it anymore. So we spare some space on the gui and also less data query on the server side.

@bruntib bruntib merged commit e3b6396 into Ericsson:master Aug 18, 2021
@csordasmarton csordasmarton deleted the improve_product_list_performance branch January 28, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database 🗄️ Issues related to the database schema. server 🖥️ test ☑️ Adding or refactoring tests usability 👍 Usability-related features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants