ofID table and broken Roster adds

We’ve been having an issue with users not able to add others to their Rosters. We have tracked this down to a value in ofID which is out of sync with the max value of rosterID in ofRoster.

Currently our ofID table has the following:

±-------±--------+

| idType | id |

±-------±--------+

| 18 | 24005 |

| 19 | 3382982 |

| 23 | 154 |

| 25 | 393 |

| 50 | 434399 |

| 26 | 2 |

±-------±--------+

It appears that idType=18 should be the max value of rosterID in ofRoster, but this has somehow gotten out of sync. When we set idType=18 to a value higher than this max value in ofRoster, and restart Openfire, all Roster functionality begins to work properly.

It is not clear how/why the ofID became out of sync with ofRoster, but now we are wondering what the other rows in table ofID are used for, and if they are also out of sync. Can anyone point to this information, or suggest an easy way to correct the bad state of ofID?

Thanks.