diff options
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_multi.cpp')
| -rw-r--r-- | src/mongo/db/pipeline/accumulator_multi.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/mongo/db/pipeline/accumulator_multi.cpp b/src/mongo/db/pipeline/accumulator_multi.cpp index 2f6971e1f22..57cf06f0090 100644 --- a/src/mongo/db/pipeline/accumulator_multi.cpp +++ b/src/mongo/db/pipeline/accumulator_multi.cpp @@ -671,12 +671,6 @@ void AccumulatorTopBottomN<sense, single>::_processValue(const Value& val) { } } - // TODO SERVER-61281 consider removing this call to fillCache(). - // Since Document caches fields the size of this cache and getApproximateSize() can vary - // depending on access. In order to avoid this and make sure we subtract the right amount if - // remove() ever gets called, we can fill the cache to get a consistent view of the size. - // Normally the outer window function code handles this, but _genKeyOutPair() makes a new - // document for sortKey, so its cache get reset. keyOutPair.first.fillCache(); const auto memUsage = keyOutPair.first.getApproximateSize() + keyOutPair.second.getApproximateSize() + sizeof(KeyOutPair); @@ -698,9 +692,6 @@ void AccumulatorTopBottomN<sense, single>::remove(const Value& val) { auto it = _map->lower_bound(keyOutPair.first); _map->erase(it); - // TODO SERVER-61281 consider removing this comment if its no longer relevant. - // After calling lower_bound() it uses SortKeyComparator and the sortKey's field cache should be - // fully populated so no need to call fillCache() again. _memUsageBytes -= keyOutPair.first.getApproximateSize() + keyOutPair.second.getApproximateSize() + sizeof(KeyOutPair); } |
