estimator#afterLoad should be invoked once only per reader.

It was being invoked once per reader and parent type combination resulting in more memory being reported to the circuit breaker than actually being used in field data.
This commit is contained in:
Martijn van Groningen 2014-02-27 13:26:54 +01:00
parent aacc169007
commit d167a0139a
1 changed files with 3 additions and 3 deletions

View File

@ -136,9 +136,9 @@ public class ParentChildIndexFieldData extends AbstractIndexFieldData<ParentChil
} finally {
for (ObjectObjectCursor<String, TypeBuilder> cursor : typeBuilders) {
cursor.value.builder.close();
if (success) {
estimator.afterLoad(null, data.getMemorySizeInBytes());
}
}
if (success) {
estimator.afterLoad(null, data.getMemorySizeInBytes());
}
}
}