comdb2
comdb2 copied to clipboard
{173778048} Count fix
See commit by commit
For first commit: bdb_count doesn't use dta if no indices are available, led to seg fault. Instead of calling bdb_count_int call bdb_direct_count_int which does use dta if no index available. Wrote robomark test direct_count for this For second commit: bdb_count_int had an optimization to find count using recnums first. Port that over to bdb_direct_count_int Ported code and cleaned up into functions from https://github.com/bloomberg/comdb2/blob/main/bdb/count.c#L66
DIFFERENCE: DB_REP_HANDLE_DEAD isn't set to BDB_ERR_DEADLOCK anymore. Don't think this would ever be a possible rc though since locks acquired before calling bdb_direct_count_int?
recnums are deprecated and barely used. I would not add new code for it.
@akshatsikarwar requested it, should I remove it?
/plugin-branch count_fix