Skip to content

Commit 2e31442

Browse files
committed
BUGFIX: add samples option to memory usage command to fix release size calculation
1 parent 1285070 commit 2e31442

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Classes/BackendUi/BackendUiDataService.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ private function calculateReleaseSize(RedisInstanceIdentifier $redisInstanceIden
105105
$size = 0;
106106

107107
foreach ($allKeys as $key) {
108-
$size += $redis->rawCommand('memory', 'usage', $key);
108+
// We need to set the `samples` option to 0 here, as the default value is 5 and specifies the number of
109+
// sampled nested values. With 0 all nested values are sampled.
110+
$size += $redis->rawCommand('memory', 'usage', $key, 'samples', '0');
109111
}
110112

111113
// bytes are returned, convert to megabytes

0 commit comments

Comments
 (0)