Closed ldrooij closed 7 months ago
Hi @ldrooij,
We have introduce new replication repl_discount_setup to resolve this problem. You can use the latest commerce service version 2024.4.0 and master branch in order to get the discounts instantly without doing the reset.
Thanks @SyedWaqasNabi, we are currently in the process of updating, we will ask our LS Retail partner to update LS commerce version too. I saw that there were changes but couldn't figure out exactly what is was for just looking at the code. I do see that the reset cronjobs are still there. Does this not truncate the tables anymore or can we safely disable the nightly reset cronjobs?
@ldrooij we have implemented a check so it will not truncate with version 2024.4.0 and onwards.
We are encountering some issues with discount replication. Each night the
repl_discount_status_reset
cronjob is executed. This job removes all discounts in the database and requires all data to be synced again after this. With many discounts and products this process takes much too long and we have a webshop without many discounts for a long time. We can now manage by limiting the number of discounts, but that is not a long term solution. It seems unnecessary to remove all data. Could you please explain why this choice was made? What would it mean if we disable the reset job? Looking into the differences from version 2.4.0 and the currentmaster branch this doesn't seem to be changed in the last version.We also see that in the
repl_discount_create
job when an offer has any changes in thels_replication_repl_discount
table that the catalogrule is remove and re-added only using the records that have been added or updated. I'm not really sure if this is a situation that will ever happen, but the a single record within a offer is updated or added the rule will only apply to the updated/added product.Preconditions (*)
Steps to reproduce (*)
repl_discount_status_reset
job to runExpected result (*)
Actual result (*)