mirror of https://gitee.com/bigwinds/arangodb
prevent unlikely division by zero
This commit is contained in:
parent
eaca014406
commit
30b4b2b402
|
@ -754,7 +754,8 @@ std::shared_ptr<Manager::PriorityList> Manager::priorityList() {
|
||||||
for (auto s : *stats) {
|
for (auto s : *stats) {
|
||||||
totalAccesses += s.second;
|
totalAccesses += s.second;
|
||||||
}
|
}
|
||||||
double normalizer = remainingWeight / static_cast<double>(totalAccesses);
|
|
||||||
|
double normalizer = remainingWeight / (std::max)(1.0, static_cast<double>(totalAccesses));
|
||||||
|
|
||||||
// gather all accessed caches in order
|
// gather all accessed caches in order
|
||||||
for (auto s : *stats) {
|
for (auto s : *stats) {
|
||||||
|
|
Loading…
Reference in New Issue