|
The current implementation of our assertions could be susceptible to counting a unique exception multiple times, due to not considering the origin of the exception. Consider the following as an example:
auto future = []() -> Future<void> {
|
try {
|
uassert(someFuncThatReturnsStatus());
|
return Status::OK();
|
}
|
catch (const DBException& ex) {
|
return ex.toStatus();
|
}
|
}();
|
auto status = future.getNoThrow();
|
uassert(status);
|
We'll bump the counter for user-assertions twice, although there's only one exception in this code-path. We should consider the origin of the exception when counting assertions, to make the metrics more reliable.
|