The ofmucroom table contains the last ID (max(roomid)) with value 33971, but the last inserted record (order by creationdate) is with value 7745, and the next one will be 7746 and so on.
This is breaking some rooms, for some reason it missed the correct sequence.
Is there any way to fix this?
roomId values are taken from the
ofId database column. Search for a row where
There are two records of idtype=23 in this base and both have the same value in the “id” column.
Would that value 1982806 be the last sequential number? If so, it’s still a very strange value.
Something seems to be very broken in your setup. The
ofID column of that table is supposed to be a primary key. That can’t have duplicate values.
Truth! Something was done wrong on that server that broke.
I made the comparison with another database and there are no such duplications. I will delete all these duplicate records and update the idtype=23 to SELECT max(roomid) + 1 FROM ofmucroom.
Do you know where there is in the documentation about the references of all these records of the ofid table for me to check the other sequential values?
Those references only exist in code, here: https://github.com/igniterealtime/Openfire/blob/master/xmppserver/src/main/java/org/jivesoftware/util/JiveConstants.java#L24-L30
I advise you to shut down Openfire before you update that database table. Openfire pre-fetches a couple of values from that table.
Thankssss! Apparently it all worked out!