comdb2 icon indicating copy to clipboard operation
comdb2 copied to clipboard

{173778048} Count fix

Open chands10 opened this issue 1 year ago • 3 comments

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?

chands10 avatar Dec 20 '23 18:12 chands10

recnums are deprecated and barely used. I would not add new code for it.

riverszhang89 avatar Dec 20 '23 18:12 riverszhang89

@akshatsikarwar requested it, should I remove it?

chands10 avatar Dec 20 '23 19:12 chands10

/plugin-branch count_fix

chands10 avatar Jan 04 '24 18:01 chands10