Skip to content

Commit

Permalink
Added log for init of auto-incrementing unique index
Browse files Browse the repository at this point in the history
  • Loading branch information
olapiv committed Nov 4, 2024
1 parent 1729009 commit 60e516c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pink/rondis/string/db_operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,10 @@ int rondb_get_rondb_key(const NdbDictionary::Table *tab,
{
return 0;
}
if (ndb->getNdbError().code == 626)
if (ndb->getNdbError().classification == NdbError::NoDataFound)
{
printf("No data found when auto-incrementing value for table '%s'; starting from scratch\n",
tab->getName());
if (ndb->setAutoIncrementValue(tab, Uint64(1), false) == 0)
{
rondb_key = Uint64(1);
Expand Down

0 comments on commit 60e516c

Please sign in to comment.