Skip to content

Commit 17dda0a

Browse files
committed
Fix max_page_length calculation for GORILLA_32BIT page type (netdata#19932)
(cherry picked from commit 6d7b6e6)
1 parent e1e4b7a commit 17dda0a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/database/engine/pdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ VALIDATED_PAGE_DESCRIPTOR validate_page(
842842
// If gorilla can not compress the data we might end up needing slightly more
843843
// than 4KiB. However, gorilla pages extend the page length by increments of
844844
// 512 bytes.
845-
max_page_length += ((page_type == RRDENG_PAGE_TYPE_GORILLA_32BIT) * RRDENG_GORILLA_32BIT_BUFFER_SIZE);
845+
max_page_length += ((page_type == RRDENG_PAGE_TYPE_GORILLA_32BIT) * (2 * RRDENG_GORILLA_32BIT_BUFFER_SIZE));
846846

847847
if (!known_page_type ||
848848
have_read_error ||

0 commit comments

Comments
 (0)