Product validity table cleanup

mikko.ropanen
mikko.ropanen Spryker Solution Partner Posts: 27 ✨ - Novice

\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,051 ⚖️ - Guardians (admin)
    edited October 2023 Answer ✓

    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,051 ⚖️ - Guardians (admin)
    edited October 2023 Answer ✓

    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: 27 ✨ - Novice

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