Calling Developers!
We are reenergizing our code contribution process! Learn More

Product validity table cleanup

Options
mikko.ropanen
mikko.ropanen Spryker Solution Partner Posts: 13 🧑🏻‍🚀 - Cadet

\Spryker\Zed\ProductValidity\Persistence\ProductValidityQueryContainer::queryProductsBecomingInvalid queries db table spy_product_validity for items that are valid_to < now.

But is this table ever cleaned up anywhere?

From what I can tell, the check-product-validity Jenkins job runs every hour (or whenever it's set up to run), does the above query, sets the resulting products as inactive and… that's it. The spy_product_validity table is untouched, and the next job run does the same things all over again.

Best Answer

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    edited October 2023 Answer ✓
    Options

    Heyhey,

    so I checked the code and I would say so as well. Overall Spryker rarely deletes any product related data ootb.

    So this table grows over time….

    Likely not the answer you wish for, yet: If you run into performance issues because of this I ask you kindly to create an official support ticket so the problem is being tracked.

    All the best,

    Florian

Answers

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,018 ⚖️ - Guardians (admin)
    edited October 2023 Answer ✓
    Options

    Heyhey,

    so I checked the code and I would say so as well. Overall Spryker rarely deletes any product related data ootb.

    So this table grows over time….

    Likely not the answer you wish for, yet: If you run into performance issues because of this I ask you kindly to create an official support ticket so the problem is being tracked.

    All the best,

    Florian

  • mikko.ropanen
    mikko.ropanen Spryker Solution Partner Posts: 13 🧑🏻‍🚀 - Cadet
    Options

    Thanks Florian! I'll probably add an isActive-check to the query and make an official ticket about this Sometime™ when I have time :)