Jim Meyering
d2a92c13bc
avoid returning a number-of-active-keys estimate of nearly 2^64
...
Summary:
If accumulated_num_non_deletions_ were ever smaller than
accumulated_num_deletions_, the computation of
"accumulated_num_non_deletions_ - accumulated_num_deletions_"
would result in a logically "negative" value, but since
the two operands are unsigned (uint64_t), the result corresponding
to e.g., -1 would 2^64-1.
Instead, return 0 in that case.
Test Plan:
- ensure "make check" still passes
- temporarily add an "abort();" call in the new "if"-block, and
observe that it fails in some test cases. However, note that
this case is triggered only when the two numbers are equal.
Thus, no test case triggers the erroneous behavior this
change is designed to avoid. If anyone can construct a
scenario in which that bug would be triggered, I'll be
happy to add a test case.
Reviewers: ljin, igor, rven, igor.sugak, yhchiang, sdong
Reviewed By: sdong
Subscribers: dhruba
Differential Revision: https://reviews.facebook.net/D36489
2015-04-03 14:46:35 -07:00
..
2015-02-26 16:25:56 -08:00
2015-02-26 16:25:56 -08:00
2015-02-23 14:10:09 -08:00
2015-03-17 15:04:37 -07:00
2015-03-30 15:12:02 -07:00
2015-03-30 15:12:02 -07:00
2015-03-19 17:04:29 -07:00
2015-03-17 14:08:00 -07:00
2015-03-19 17:29:37 -07:00
2015-03-24 14:42:04 -07:00
2015-03-24 14:42:04 -07:00
2015-03-19 17:29:37 -07:00
2015-04-02 11:06:30 -07:00
2015-04-02 11:06:30 -07:00
2015-04-02 11:06:30 -07:00
2015-04-02 11:06:30 -07:00
2015-03-19 17:29:37 -07:00
2015-03-17 14:08:00 -07:00
2015-03-17 14:08:00 -07:00
2015-03-30 12:58:32 -07:00
2015-03-19 17:04:29 -07:00
2015-03-30 15:04:10 -04:00
2014-12-22 12:20:17 -08:00
2014-11-26 11:37:59 -08:00
2015-04-02 11:06:30 -07:00
2015-03-30 15:04:10 -04:00
2015-03-19 17:29:37 -07:00
2015-03-24 14:42:04 -07:00
2014-09-08 15:04:34 -07:00
2015-04-02 16:17:58 -07:00
2015-03-17 14:08:00 -07:00
2014-11-11 16:47:22 -05:00
2015-02-26 11:28:41 -08:00
2015-03-19 17:29:37 -07:00
2015-03-17 14:08:00 -07:00
2015-03-17 14:08:00 -07:00
2014-11-11 16:47:22 -05:00
2014-11-11 16:47:22 -05:00
2015-03-17 14:08:00 -07:00
2015-01-22 14:32:03 -08:00
2015-01-22 14:32:03 -08:00
2015-03-19 17:29:37 -07:00
2015-03-13 10:45:40 -07:00
2015-03-13 10:45:40 -07:00
2014-10-02 14:33:16 -07:00
2015-01-26 11:48:07 -08:00
2015-02-26 11:28:41 -08:00
2015-02-26 11:28:41 -08:00
2015-04-01 10:48:42 -07:00
2015-03-18 17:03:59 -07:00
2015-03-30 15:04:10 -04:00
2015-03-19 17:29:37 -07:00
2015-02-04 21:39:45 -08:00
2014-01-02 16:32:31 -08:00
2015-02-23 14:10:09 -08:00
2014-01-27 14:49:10 -08:00
2015-03-17 14:08:00 -07:00
2015-02-20 11:07:17 -08:00
2013-10-16 17:48:41 -07:00
2015-02-24 16:24:53 -08:00
2015-02-18 11:49:31 -08:00
2014-12-02 12:09:20 -08:00
2014-12-02 12:09:20 -08:00
2015-03-18 17:03:59 -07:00
2015-03-18 17:03:59 -07:00
2015-03-24 14:42:04 -07:00
2015-03-24 14:42:04 -07:00
2015-01-13 12:27:28 -08:00
2014-03-24 17:57:13 -07:00
2015-03-24 14:42:04 -07:00
2015-03-24 14:42:04 -07:00
2014-03-26 18:11:41 -07:00
2015-02-26 11:28:41 -08:00
2015-03-30 16:05:35 -04:00
2015-03-19 17:29:37 -07:00
2015-03-19 17:29:37 -07:00
2015-03-17 15:04:37 -07:00
2015-03-17 14:08:00 -07:00
2014-12-02 12:09:20 -08:00
2015-03-17 19:23:08 -07:00
2015-02-26 11:28:41 -08:00
2014-10-28 17:52:32 -07:00
2014-09-29 11:09:09 -07:00
2015-03-17 14:08:00 -07:00
2014-11-24 20:44:49 -08:00
2015-02-26 11:28:41 -08:00
2014-11-06 11:14:28 -08:00
2015-02-26 11:28:41 -08:00
2015-03-19 17:29:37 -07:00
2015-02-06 08:44:30 -08:00
2014-10-31 16:34:38 -07:00
2015-03-17 14:08:00 -07:00
2014-10-31 11:59:54 -07:00
2015-02-06 08:44:30 -08:00
2015-04-03 09:04:35 -07:00
2015-04-03 14:46:35 -07:00
2015-03-30 15:12:02 -07:00
2015-03-19 17:29:37 -07:00
2015-02-26 11:28:41 -08:00
2014-11-10 17:39:38 -05:00
2015-03-17 19:23:08 -07:00
2014-11-18 10:20:10 -08:00
2015-03-19 17:29:37 -07:00
2015-03-24 14:42:04 -07:00
2015-03-17 14:08:00 -07:00
2014-09-08 11:20:25 -07:00
2014-09-13 14:14:10 -07:00
2014-09-12 16:23:58 -07:00
2015-02-04 21:39:45 -08:00
2014-12-02 12:09:20 -08:00