MAGE-3381: fix checkout and cron #57
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Klarna module introduced changes to the logging of API requests. In db_schema.xml the primary key was set to smallint (signed), which means the table can only handle 32767 records. When the table becomes full, the checkout fails to load due to a unique contraint violation error (which can be traced back to not being able to add any more records to the log table), resulting in a blank page.
This fix will increase the number of possible entries for the Klarna requests logging table. Hence, the checkout won't fail to load anymore. The amount of possible entries is going from 32767 to 4294967295 rows.
It also fixes a malformed select query, that is triggered via a cron job, which is supposed to clean up this table from entries older than x days. The query contained a where condition on a column store_id, but that column does not exist on the table.
Fixed Issues
https://jira.int.klarna.net/jira/browse/MAGE-3381