gortiz commented on code in PR #10687:
URL: https://github.com/apache/pinot/pull/10687#discussion_r1183396119
##########
pinot-controller/src/main/java/org/apache/pinot/controller/recommender/realtime/provisioning/MemoryEstimator.java:
##########
@@ -387,9 +375,13 @@ private int getAvgMultiValues() {
private long getMemoryForInvertedIndex(long totalMemoryForConsumingSegment) {
// TODO: better way to estimate inverted indexes memory utilization
long totalInvertedIndexSizeBytes = 0;
- if (!_invertedIndexColumns.isEmpty()) {
+ Map<String, IndexConfig> invertedConfig =
StandardIndexes.inverted().getConfig(_tableConfig, _schema);
Review Comment:
Others never have to do this. What they do is to use `FieldIndexConfigs`.
That is the source of trust and that is what all code should use.
In this case, we don't have that object and we are not actually interested
in other indexes. Therefore I tried to do not create that object. But it
doesn't make sense to call `getConfig` so many times, so I'm moving the code to
another function and calling it only once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]