What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Morning! Has anyone had an issue with the `spy_oms_state_machine_lock` table going above the default

U017Y69D9U4
U017Y69D9U4 Posts: 34 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

Morning! Has anyone had an issue with the spy_oms_state_machine_lock table going above the default auto-increment column range? Over the weekend it seems like we went over the column limit (it is an int4, so 2147483647) and caused some major issues ๐Ÿ˜•

Comments

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    not yet, but it will be a problem for us too... U can override it in pyz level and overwrite the pk as bigint (take care that bigint is mapped as string back, although u define the mapping).

  • U017Y69D9U4
    U017Y69D9U4 Posts: 34 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Hmm - yeah that will definitely increase the maximum value, but I guess only puts it off for a longer period of time

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet
    edited April 2022

    int4 to bigint u have a lot of time, sure! but no other solutions now.... (if u continue to use db as lock, of course u can reset the autoincrement etc...)

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 ๐Ÿช - Explorer

    You could reset the auto_increment on this table from time to time, as the entries should only be in there for a short amount of time.
    This is one of the flaws of Spryker, where using an auto_increment does not make sense and choosing a different "id" column would have avoided the issue (identifier could be used as well). Another solution would be to use an application generated id instead, like a uuid for example by using https://github.com/donkeycode/propel-uuid-behavior.

  • U017Y69D9U4
    U017Y69D9U4 Posts: 34 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Yeah definitely, I agree can't see the need for the auto-increment on this table ๐Ÿ™‚

  • UKEP86J66
    UKEP86J66 Posts: 208 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    I think it is a requirement of propel to always have a PK. Agree a UUID would be much better for this type of table

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 ๐Ÿช - Explorer

    @UKEP86J66 To have a primary key is a requirement of propel, but it does not need to be an integer nor an auto_increment.