8000 fix shrink method in aqlitemblock (#11122) · arangodb/arangodb@7c0edee · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c0edee

Browse files
hkernbachKVS85
authored andcommitted
fix shrink method in aqlitemblock (#11122)
1 parent 441c941 commit 7c0edee

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arangod/Aql/AqlItemBlock.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,13 @@ void AqlItemBlock::shrink(size_t nrItems) {
347347

348348
decreaseMemoryUsage(sizeof(AqlValue) * (_nrItems - nrItems) * _nrRegs);
349349

350+
// remove the shadow row indices pointing to now invalid rows.
351+
_shadowRowIndexes.erase(_shadowRowIndexes.lower_bound(nrItems),
352+
_shadowRowIndexes.end());
353+
354+
// adjust the size of the block
355+
_nrItems = nrItems;
356+
350357
for (size_t i = numEntries(); i < _data.size(); ++i) {
351358
AqlValue& a = _data[i];
352359
if (a.requiresDestruction()) {
@@ -368,13 +375,6 @@ void AqlItemBlock::shrink(size_t nrItems) {
368375
}
369376
a.erase();
370377
}
371-
372-
// remove the shadow row indices pointing to now invalid rows.
373-
_shadowRowIndexes.erase(_shadowRowIndexes.lower_bound(nrItems),
374-
_shadowRowIndexes.end());
375-
376-
// adjust the size of the block
377-
_nrItems = nrItems;
378378
}
379379

380380
void AqlItemBlock::rescale(size_t nrItems, RegisterId nrRegs) {

0 commit comments

Comments
 (0)
0