There is an issue with creating requests which results in merging of old offers and new offers.
The cause (what I can only assume) is due to the last row/id retrieved from the database being incorrect, which I can only assume is the result of mysql/mariadb perhaps doing some caching and even 6 seconds after a row is inserted, when sorting, the latest row by created_at timestamp, will still sometimes provide the wrong row and by extension the wrong starting id causing merging of different offers. I "fixed" this with an albeit unsatisfactory but seemingly required (if my assumptions are correct) solution of getting the last id from mysql initially but then putting it into a redis cache where the value is retrieved and incremented which is way faster than mysql and more reliable (I suspect due to redis being an in-memory db rather than mysql which needs to write changes to disk and such).
Created by: JordanPlayz158
There is an issue with creating requests which results in merging of old offers and new offers.
The cause (what I can only assume) is due to the last row/id retrieved from the database being incorrect, which I can only assume is the result of mysql/mariadb perhaps doing some caching and even 6 seconds after a row is inserted, when sorting, the latest row by created_at timestamp, will still sometimes provide the wrong row and by extension the wrong starting id causing merging of different offers. I "fixed" this with an albeit unsatisfactory but seemingly required (if my assumptions are correct) solution of getting the last id from mysql initially but then putting it into a redis cache where the value is retrieved and incremented which is way faster than mysql and more reliable (I suspect due to redis being an in-memory db rather than mysql which needs to write changes to disk and such).