You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Zoltan Martonka (Code Review)" <ge...@cloudera.org> on 2026/09/21 07:30:51 UTC
[kudu-CR] WIP KUDU-2874 Add option to allow huge cells.
Zoltan Martonka has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24901
Change subject: WIP KUDU-2874 Add option to allow huge cells.
......................................................................
WIP KUDU-2874 Add option to allow huge cells.
The current static 128 normal and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be
able to change this values dynamically. However we must do it in a
way that does not affect the performance of already existing tables.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a tablet:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is ok by current
logic, no need to downsize.
- we read some (lets say 20) small values of s2, until we suddenly encounter
multiple 1 MB cells.
At this point we already have around 7 MB data loaded. No matter how we
restructure the code at this point if we downsize the sent back batch to
x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1, so we will reread them in next batch
2. Keep the 128- x values of s1 in the memory attached to the scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have many
scan session, so keeping things in memory between batches can increase risk of
OOM.
One solution is to allow for a "huge" option of tablets. If a tablet is
not marked as "huge", the only performance impact is a quick check for
the attribute.
If it is marked, we allow cells up to 1MB, however we decrease the
batch size used in case of this tablet at write time if any big cells is
committed to the tablet.
This reduces memory usage in TestRandomUpsertOrderedScan from 26GB to:
Peak tmalloc memory during test : 13825 MiB
Peak root mem tracker memory during test : 13126 MiB
Decreasing memory used over the limit from 18 to 5 GB.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ordered_scan_large_cells-test.cc
M src/kudu/tserver/tablet_service.cc
19 files changed, 373 insertions(+), 32 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/1
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 6: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3111/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 6
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Oct 2026 16:01:13 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8: Code-Review+2
(1 comment)
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
File src/kudu/integration-tests/ordered_scan_large_cells-itest.cc:
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc@251
PS6, Line 251: for (const auto* e : pending) {
: int64_t pk = 0;
> I witched CHECKS to ASSERTS.
I meant you might use FindOrNull() here instead of iterators. OK, it's good enough as of PS8 -- the changelist has had several revisions already, and this is only a tiny nit.
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Nov 2026 20:04:43 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4:
(3 comments)
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet.cc@1475
PS3, Line 1475: default:
> The switch only accounts for INSERT/INSERT_IGNORE/UPSERT/UPSERT_IGNORE (UPD
Update added in:
https://gerrit.cloudera.org/c/24966
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet_metadata.cc@1047
PS3, Line 1047: }
> Nothing in this patch prevents allow_huge from being reset to NOT_ALLOWED (
This won't be the only thing allowing the user to shoot itself in the foot. It is a table level setting, I will remove the obsolete todo.
I don't know if it can be made "safe". User should understand what the flag does, and not carelessly remove it from an already huge table.
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tserver/tablet_service.cc
File src/kudu/tserver/tablet_service.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tserver/tablet_service.cc@3242
PS3, Line 3242: if (tablet_metadata->allows_huge_cells()) {
> allows_huge_cells() takes data_lock_ (a simple_spinlock, see tablet_metadat
I switched to a cached atomic.
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Sep 2026 13:49:30 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Alexey Serbin, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24901
to look at the new patch set (#5).
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
KUDU-3812 Add option to allow huge cells.
The current static 128 normal and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be
able to change this values dynamically. However we must do it in a
way that does not affect the performance of already existing tables.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a tablet:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is ok by current
logic, no need to downsize.
- we read some (lets say 20) small values of s2, until we suddenly encounter
multiple 1 MB cells.
At this point we already have around 7 MB data loaded. No matter how we
restructure the code at this point if we downsize the sent back batch to
x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1, so we will reread them in next batch
2. Keep the 128- x values of s1 in the memory attached to the scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have many
scan session, so keeping things in memory between batches can increase risk of
OOM.
One solution is to allow for an automatic batch sizing option of tables,
and also allow setting a higher cell limit on tables, where the option is
turned on.
Each tablet gets an optional batch size uper limit, that can be automatically
upgraded at write time.
If a tablet does not have an override, the only performance impact is a quick
check for the attribute (only a single int atomic load).
If it has an upper limit for batching, it will be applied both on normal and
merge buffer sizes.
The original buffer sizes differ, because merge buffer was tuned more with
small rows in mind, while the normal buffer size is basically:
--scanner_max_batch_size_bytes / --max_cell_size_bytes = 128
However when rows are starting to get big, using the same limit makes sense.
This reduces memory usage in TestRandomUpsertOrderedScan from 18 BG to 9.8 GB.
Decreasing memory used over the limit from ~10 GB to 1.8 GB.
Remaining TODOs:
+ Handle updates:
Handling updates on a best effort basis is straight forward. But with tests,
it is another hundreds of lines of codes. So there will be a follow up patch
for it.
+ Allow for auto batch sizing to be turned of and the batch size to decreased:
This is a risky task due to the number of ways log replay can go wrong.
It is indeed worth a separate commit.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/tablet_service.cc
22 files changed, 1,193 insertions(+), 120 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/5
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 5
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 5:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3110/
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 5
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Oct 2026 14:21:14 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 5:
The following changes were done:
+ Separated allow huge cells into 2 flags:
batch sizing and max cell size. Max cell size is only allowed to go over 64k if batch sizing is auto.
+ Batch sizing cannot be set back to normal for now, and once max cell size is set, it can only be increased. Clearing auto batching and decreasing allowed cells can go bad so many ways with log replay (in case of restart) and fallen back replicas that it should be a separate individual commit.
+ I will include upgrades on a best effort bases in a following patch (hopefully tomorrow). This one is straight forward, but with the tests, it would add significant code to this already heavy path.
+ The multiplier between normal and merge batches were stupid. I kept the original 8 (1024/128), but once data starts to grow, there should be the same, or there is reason to even set merge lower (since it is the real memory heavy one). But for now it seems ok to just use the same. (not perfect, but ok).
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 5
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Oct 2026 14:30:54 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3348/
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Nov 2026 16:58:50 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Alexey Serbin, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24901
to look at the new patch set (#4).
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
KUDU-2874 Add option to allow huge cells.
The current static 128 normal and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be
able to change this values dynamically. However we must do it in a
way that does not affect the performance of already existing tables.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a tablet:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is ok by current
logic, no need to downsize.
- we read some (lets say 20) small values of s2, until we suddenly encounter
multiple 1 MB cells.
At this point we already have around 7 MB data loaded. No matter how we
restructure the code at this point if we downsize the sent back batch to
x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1, so we will reread them in next batch
2. Keep the 128- x values of s1 in the memory attached to the scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have many
scan session, so keeping things in memory between batches can increase risk of
OOM.
One solution is to allow for a "huge" option of tablets. If a tablet is
not marked as "huge", the only performance impact is a quick check for
the attribute.
If it is marked, we allow cells up to 1MB, however we decrease the
batch size used in case of this tablet at write time if any big cells is
committed to the tablet.
This reduces memory usage in TestRandomUpsertOrderedScan from 26GB to:
Peak tmalloc memory during test : 13825 MiB
Peak root mem tracker memory during test : 13126 MiB
Decreasing memory used over the limit from 18 to 5 GB.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ordered_scan_large_cells-test.cc
M src/kudu/tserver/tablet_service.cc
21 files changed, 637 insertions(+), 32 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/4
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] WIP KUDU-2874 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: WIP KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/2996/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 21 Sep 2026 07:37:51 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8: -Verified
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3376/
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Nov 2026 20:06:18 +0000
Gerrit-HasComments: No
[kudu-CR] WIP KUDU-2874 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: WIP KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/2996/
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 21 Sep 2026 07:30:57 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 7:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3300/
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 7
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Nov 2026 15:29:15 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3376/ : FAILURE
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 12 Nov 2026 20:57:22 +0000
Gerrit-HasComments: No
[kudu-CR] WIP KUDU-2874 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: WIP KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 2:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3000/
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 21 Sep 2026 11:23:43 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24901
to look at the new patch set (#3).
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
KUDU-2874 Add option to allow huge cells.
The current static 128 normal and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be
able to change this values dynamically. However we must do it in a
way that does not affect the performance of already existing tables.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a tablet:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is ok by current
logic, no need to downsize.
- we read some (lets say 20) small values of s2, until we suddenly encounter
multiple 1 MB cells.
At this point we already have around 7 MB data loaded. No matter how we
restructure the code at this point if we downsize the sent back batch to
x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1, so we will reread them in next batch
2. Keep the 128- x values of s1 in the memory attached to the scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have many
scan session, so keeping things in memory between batches can increase risk of
OOM.
One solution is to allow for a "huge" option of tablets. If a tablet is
not marked as "huge", the only performance impact is a quick check for
the attribute.
If it is marked, we allow cells up to 1MB, however we decrease the
batch size used in case of this tablet at write time if any big cells is
committed to the tablet.
This reduces memory usage in TestRandomUpsertOrderedScan from 26GB to:
Peak tmalloc memory during test : 13825 MiB
Peak root mem tracker memory during test : 13126 MiB
Decreasing memory used over the limit from 18 to 5 GB.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ordered_scan_large_cells-test.cc
M src/kudu/tserver/tablet_service.cc
19 files changed, 375 insertions(+), 32 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/3
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 2: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3000/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 21 Sep 2026 12:26:03 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4:
> Patch Set 3:
>
> (3 comments)
>
> Couple observations from my end.
> Test coverage gaps: the new restart test and the un-DISABLED reproducer are good, but I think it would be good to see coverage for:
> - Upper-bound enforcement: a cell larger than max_huge_cell_size_bytes is rejected even when allow_huge is set (and that a non-huge table still rejects at max_cell_size_bytes). This is the core new limit and is currently untested.
> - Config round-trip / parse: ParseAllowHugeConfig — valid "auto_batch_size", invalid value returns InvalidArgument, and ExtraConfigPBFromPBMap <-> ExtraConfigPBToPBMap round-trips the kudu.table.allow_huge key. The disable_compaction pattern in alter_table-test.cc:2732 is a good template.
> (These are small, cheap unit tests)
Added the 2 new requested test.
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Sep 2026 12:44:46 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4:
(6 comments)
Thanks a lot for putting this together!
I've started looking at this changelist; planning to continue tomorrow morning.
I'm posting a few high-level questions at this time; more feedback is expected soon.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/common.proto
File src/kudu/common/common.proto:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/common.proto@540
PS4, Line 540: AllowHuge
As a naming convention for protobuf in Kudu, PB suffix is usually omitted, so something like AllowHugeCells seems to be a more descriptive and aligns with the naming conventions.
Also, this particular enum is more about scan batch sizing, not huge cells per se. Aren't these two separate/orthogonal? Once adaptive batch sizing is introduced, it might be employed for any table where the caller wants to have more control over the memory allocated by server-side scanner objects, right?
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/generic_iterators.cc
File src/kudu/common/generic_iterators.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/generic_iterators.cc@92
PS4, Line 92: 8
Is this empirical-based setting? Where does the default setting come from?
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/metadata.proto
File src/kudu/tablet/metadata.proto:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/metadata.proto@195
PS4, Line 195: in rows
nit: in number of rows?
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@175
PS4, Line 175: max_scan_batch_size_approx
We tend to name flags to reflect the unit (unless it's a pure count). So, something like max_scan_batch_approx_size_bytes and similar looks a bit more appropriate here.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@178
PS4, Line 178: smaller row batches
... less number of rows in a batch ...
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@1468
PS4, Line 1468: TODO(zmartonka): add updates too.
Do you plan to address this in a separate changelist of this is pending TODO for the next PS in this review?
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Wed, 30 Sep 2026 03:28:41 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Alexey Serbin, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24901
to look at the new patch set (#6).
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
KUDU-3812 Add option to allow huge cells.
The current static 128 normal and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be
able to change this values dynamically. However we must do it in a
way that does not affect the performance of already existing tables.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a tablet:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is ok by current
logic, no need to downsize.
- we read some (lets say 20) small values of s2, until we suddenly encounter
multiple 1 MB cells.
At this point we already have around 7 MB data loaded. No matter how we
restructure the code at this point if we downsize the sent back batch to
x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1, so we will reread them in next batch
2. Keep the 128- x values of s1 in the memory attached to the scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have many
scan session, so keeping things in memory between batches can increase risk of
OOM.
One solution is to allow for an automatic batch sizing option of tables,
and also allow setting a higher cell limit on tables, where the option is
turned on.
Each tablet gets an optional batch size uper limit, that can be automatically
upgraded at write time.
If a tablet does not have an override, the only performance impact is a quick
check for the attribute (only a single int atomic load).
If it has an upper limit for batching, it will be applied both on normal and
merge buffer sizes.
The original buffer sizes differ, because merge buffer was tuned more with
small rows in mind, while the normal buffer size is basically:
--scanner_max_batch_size_bytes / --max_cell_size_bytes = 128
However when rows are starting to get big, using the same limit makes sense.
This reduces memory usage in TestRandomUpsertOrderedScan from 18 BG to 9.8 GB.
Decreasing memory used over the limit from ~10 GB to 1.8 GB.
Remaining TODOs:
+ Handle updates:
Handling updates on a best effort basis is straight forward. But with tests,
it is another hundreds of lines of codes. So there will be a follow up patch
for it.
+ Allow for auto batch sizing to be turned of and the batch size to decreased:
This is a risky task due to the number of ways log replay can go wrong.
It is indeed worth a separate commit.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/tablet_service.cc
22 files changed, 1,196 insertions(+), 120 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/6
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 6
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 5:
Build Aborted
http://jenkins.kudu.apache.org/job/pre_commit/3110/ : ABORTED
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 5
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Oct 2026 15:09:51 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4:
(4 comments)
Overall logic seems ok to me.
I still need to go through the test coverage.
A few questions/comments.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/generic_iterators.cc
File src/kudu/common/generic_iterators.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/generic_iterators.cc@92
PS4, Line 92: 8
> Is this empirical-based setting? Where does the default setting come from?
+1
Instead of a constant multiplier, would it make sense to have this flag based and auto-tuned on cell size? In other words, irrespective of different cell sized tables, the memory per iterator stays flat.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@3492
PS4, Line 3492: merge_row_buffer_size
With 'FLAGS_merge_scan_multiplier' as default constant and auto-tuned 'batch_size_override' for near 1MiB cells, would total size requirements increase with more number of rowsets in picture?
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@3493
PS4, Line 3493: std::min<int64_t>(buffer_size, std::numeric_limits<int>::max()));
Should there be a tighter cap with semantic memory protection instead of looking to prevent integer overflow?
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet_metadata.cc@1073
PS4, Line 1073: MaybeLowerBatchSizeOverride
Does batch_size_override_ remain on the same low value even if there are only small sized rows?
If yes, do you think that can impact scans where only small sized rows are retrieved?
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Wed, 30 Sep 2026 13:04:29 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3053/
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Sep 2026 12:44:00 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 6:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3111/
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 6
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Oct 2026 15:09:54 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 3:
(3 comments)
Couple observations from my end.
Test coverage gaps: the new restart test and the un-DISABLED reproducer are good, but I think it would be good to see coverage for:
- Upper-bound enforcement: a cell larger than max_huge_cell_size_bytes is rejected even when allow_huge is set (and that a non-huge table still rejects at max_cell_size_bytes). This is the core new limit and is currently untested.
- Config round-trip / parse: ParseAllowHugeConfig — valid "auto_batch_size", invalid value returns InvalidArgument, and ExtraConfigPBFromPBMap <-> ExtraConfigPBToPBMap round-trips the kudu.table.allow_huge key. The disable_compaction pattern in alter_table-test.cc:2732 is a good template.
(These are small, cheap unit tests)
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet.cc@1475
PS3, Line 1475: switch (decoded.type) {
The switch only accounts for INSERT/INSERT_IGNORE/UPSERT/UPSERT_IGNORE (UPDATE is a documented TODO). But with allow_huge set, the decoder's per-cell limit is raised to max_huge_cell_size_bytes for all ops including UPDATE (DecodeWriteOperations), so an UPDATE can grow a string cell to ~1MB without ever lowering batch_size_override. An ordered scan over such a tablet would still hit the original OOM this patch is meant to prevent. Is that combination reachable in practice, and if so should the limitation be called out more loudly than an inline TODO?
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet_metadata.cc@1047
PS3, Line 1047: bool TabletMetadata::allows_huge_cells() const {
Nothing in this patch prevents allow_huge from being reset to NOT_ALLOWED (it's just extra-config). If a tablet already holds 1MB cells and the property is cleared, allows_huge_cells() returns false, scans revert to the 128-row default, and we're back to the OOM scenario. Is disabling validated/blocked on the master side (that integration isn't in this patch - the test even notes "this should be a table and not a tablet-level setting"), or is that a follow-up? Worth a note on the intended guardrails.
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tserver/tablet_service.cc
File src/kudu/tserver/tablet_service.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tserver/tablet_service.cc@3242
PS3, Line 3242: if (tablet_metadata->allows_huge_cells()) {
allows_huge_cells() takes data_lock_ (a simple_spinlock, see tablet_metadata.cc:1048), and HandleContinueScanRequest runs once per batch continuation for every scan on every table, not just huge-cell tables. The commit message says a non-huge tablet only pays "a quick check for the attribute," but this is now a lock acquisition - the same lock held during metadata/superblock flush. Could you gate the common case behind a lock-free read? Since batch_size_override_ is already std::atomic, an std::atomic<bool> allows_huge_ cache (set in LoadFromSuperBlock/SetExtraConfig) would keep the default path lock-free and match the stated design. Same applies to the allows_huge_cells() call in tablet.cc Iterator::Init (less hot, but same idea).
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 3
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 22 Sep 2026 14:42:03 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4: Code-Review+1
(2 comments)
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet.cc@1475
PS3, Line 1475: default:
> Update added in:
Thank you for following up on this!
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:
http://gerrit.cloudera.org:8080/#/c/24901/3/src/kudu/tablet/tablet_metadata.cc@1047
PS3, Line 1047: }
> This won't be the only thing allowing the user to shoot itself in the foot.
Thanks its ok with me. We just have to make sure that once the feature patches land we have proper docs too.
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 29 Sep 2026 11:45:14 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Alexey Serbin, Kurt Deschler, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
https://gerrit.cloudera.org/24901
to look at the new patch set (#7).
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
KUDU-3812 Add option to allow huge cells.
The current static 128 regular and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be able
to change these values dynamically. However, we must do it in a way that
does not affect the performance of read and write operations against
tables with regular/smaller cells.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a table schema:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is OK by current
logic, no need to downsize.
- we read some (let's say 20) small values of s2, until we suddenly
encounter multiple 1 MB cells.
At this point we already have around 7 MB data loaded into the server's
memory. No matter how we restructure the code at this point, if we downsize
the sent back batch to x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1 from the server's memory, so we will
fetch them from disk during the next continued scan request again.
2. Keep the 128 - x values of s1 in the server's memory. Attached to the
scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have
many scan sessions, so keeping things in memory between batches can
increase risk of OOM condition.
One solution is to allow for an automatic batch sizing option of tables,
and also allow setting a higher cell size limit on tables, where the option
is turned on.
Each tablet gets an optional batch size upper limit, that can be
automatically updated at write time.
If a tablet does not have an override, the only performance impact is a
quick check for the attribute (only a single int atomic load).
If it has an upper limit for batching, it will be applied both on regular
and merge buffer sizes.
The original buffer sizes differ, because merge buffer was tuned more with
small rows in mind, while the regular buffer size is basically:
--scanner_max_batch_size_bytes / --max_cell_size_bytes = 128
However, when rows are starting to get big, using the same limit makes
sense.
This reduces memory usage in TestRandomUpsertOrderedScan from 18 GB to
9.8 GB.
Decreasing memory used over the limit from ~10 GB to 1.8 GB.
Remaining TODOs:
+ Handle update row operations:
Updates might contain values only for some of the columns. Handling it on
a best effort basis is straightforward. But with tests, it is another
hundreds of lines of code. So there will be a follow up patch for it.
+ Allow for auto batch sizing to be turned off and the batch size to be
decreased:
This is a risky task due to the number of ways log replay can go wrong.
It is indeed worth a separate commit.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/integration-tests/CMakeLists.txt
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/tablet_service.cc
23 files changed, 1,215 insertions(+), 121 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/7
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 7
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 7: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3300/ : FAILURE
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 7
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Nov 2026 16:30:26 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 7:
(28 comments)
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG
Commit Message:
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@9
PS6, Line 9: regula
> nit: regular
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@12
PS6, Line 12: val
> these
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@12
PS6, Line 12: ver, we
> nit: add a comma after 'However'
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@19
PS6, Line 19:
> nit: a table schema
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@25
PS6, Line 25:
> nit: OK
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@30
PS6, Line 30: arou
> nit: add comma after 'point'
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@32
PS6, Line 32: the sent back batch to x = 21-22 rows, we have to either:
: 1. Throw away 128 - x values of s1 from the server's memory, so we will
> nit: indicate more clearly this is about the server-side memory and scanner
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@36
PS6, Line 36: an sess
> sessions
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@37
PS6, Line 37: Nei
> nit: OOM condition
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@40
PS6, Line 40:
> cell size limit
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@42
PS6, Line 42: lim
> upper
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@42
PS6, Line 42: h
> nit: remove the extra space?
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@43
PS6, Line 43: .
> How do we handle updates/deletes? I guess the stats on the scan batch size
Updates: next commit.
Deletes: we can't.
I will introduce a manual cap setting, so an operator can reset or fine tune the cap.
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@43
PS6, Line 43: is turne
> updated/refreshed?
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@47
PS6, Line 47: is a
> nit: regular
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@51
PS6, Line 51:
> nit: regular
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@53
PS6, Line 53: small ro
> nit: add a comma after 'However'
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@55
PS6, Line 55: ma
> GB
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@60
PS6, Line 60:
> Perhaps, you meant controlling size of the write operations? In other word
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@61
PS6, Line 61: 0 GB to 1.8 GB.
> straightforward
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@62
PS6, Line 62:
> code
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@64
PS6, Line 64:
> to be decreased
Done
https://gerrit.cloudera.org/#/c/24901/6//COMMIT_MSG@64
PS6, Line 64:
> off
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/common/common.proto
File src/kudu/common/common.proto:
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/common/common.proto@541
PS6, Line 541: UNKNOWN_B
> For naming and default values please follow the best practices for proto2:
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/common/common.proto@550
PS6, Line 550:
> nit: Is this really per-cell? I guess that's still per-table now? Or that'
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
File src/kudu/integration-tests/ordered_scan_large_cells-itest.cc:
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc@217
PS6, Line 217: tor<Status>* err
> nit: common notation is using Status::OK for success; Status::OK() doesn't
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc@244
PS6, Line 244: ) { STLDele
> nit: add an assert to make sure the error registry isn't overflown?
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc@251
PS6, Line 251: const auto it = pk_to_idx.find(pk);
: ASSERT_TRUE(it != pk_to_idx.end())
> nit: prefer using map-util.h wrappers instead
I witched CHECKS to ASSERTS.
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 7
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Nov 2026 16:05:56 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8:
(3 comments)
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
File src/kudu/integration-tests/ordered_scan_large_cells-itest.cc:
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/integration-tests/ordered_scan_large_cells-itest.cc@654
PS6, Line 654: // bootstrap path rather than loading them from a flushed rowset.
> Does it make sense to add a test that verifies the expected behavior for a
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/master/catalog_manager.cc@2139
PS6, Line 2139: PBMap(req.extra_conf
> nit: could use {} for brevity here?
Done
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/tablet/rowset.cc
File src/kudu/tablet/rowset.cc:
https://gerrit.cloudera.org/#/c/24901/6/src/kudu/tablet/rowset.cc@52
PS6, Line 52: M
> nit: introduce a constant with a good name for this special value?
Done
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Nov 2026 17:03:18 +0000
Gerrit-HasComments: Yes
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Marton Greber (Code Review)" <ge...@cloudera.org>.
Marton Greber has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8: Code-Review+1
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Wed, 11 Nov 2026 12:23:58 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-2874 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-2874 Add option to allow huge cells.
......................................................................
Patch Set 4: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3053/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 4
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 28 Sep 2026 13:40:58 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 6:
(5 comments)
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/generic_iterators.cc
File src/kudu/common/generic_iterators.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/common/generic_iterators.cc@92
PS4, Line 92:
> +1
Removed. See prev top level comment. Also added to the commit message:
The original buffer sizes differ, because merge buffer was tuned more with
small rows in mind, while the normal buffer size is basically:
--scanner_max_batch_size_bytes / --max_cell_size_bytes = 128
However when rows are starting to get big, using the same limit makes sense.
I think the main heavy test already tests for very large number of rowsets, and now memory consumption seems acceptable.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/metadata.proto
File src/kudu/tablet/metadata.proto:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/metadata.proto@195
PS4, Line 195: tch siz
> nit: in number of rows?
Done
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc
File src/kudu/tablet/tablet.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@1468
PS4, Line 1468:
> Do you plan to address this in a separate changelist of this is pending TOD
Yes. I will add a separate commit, because this one already betting way too big.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet.cc@3493
PS4, Line 3493: berkeley): Should we even display this? It's one line per rowset
> Should there be a tighter cap with semantic memory protection instead of lo
I just added this as a "you always do this, when converting to int32", so no warning from smarter analytic tools or llms. There is no reason for it to actually go over ~1000. Also it can't get over the flag of max_scan_batch_approx_size_bytes.
In the new version it is capped by the default batch size.
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet_metadata.cc
File src/kudu/tablet/tablet_metadata.cc:
http://gerrit.cloudera.org:8080/#/c/24901/4/src/kudu/tablet/tablet_metadata.cc@1073
PS4, Line 1073: imit_bytes_.load(std::memor
> Does batch_size_override_ remain on the same low value even if there are on
It can impact scans. That's why it's a table level config, and not just a global switch. You sacrifice some scanning speed for stability with huge cells. The following could be done (but all worth a separate patch):
+ Only apply the cap, if there is variadic length data in the projection
+ Allow user to set/reset the cap manually. (But syncrhronization is not trivial).
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 6
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Oct 2026 15:10:38 +0000
Gerrit-HasComments: Yes
[kudu-CR] WIP KUDU-2874 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24901
to look at the new patch set (#2).
Change subject: WIP KUDU-2874 Add option to allow huge cells.
......................................................................
WIP KUDU-2874 Add option to allow huge cells.
The current static 128 normal and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be
able to change this values dynamically. However we must do it in a
way that does not affect the performance of already existing tables.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a tablet:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is ok by current
logic, no need to downsize.
- we read some (lets say 20) small values of s2, until we suddenly encounter
multiple 1 MB cells.
At this point we already have around 7 MB data loaded. No matter how we
restructure the code at this point if we downsize the sent back batch to
x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1, so we will reread them in next batch
2. Keep the 128- x values of s1 in the memory attached to the scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have many
scan session, so keeping things in memory between batches can increase risk of
OOM.
One solution is to allow for a "huge" option of tablets. If a tablet is
not marked as "huge", the only performance impact is a quick check for
the attribute.
If it is marked, we allow cells up to 1MB, however we decrease the
batch size used in case of this tablet at write time if any big cells is
committed to the tablet.
This reduces memory usage in TestRandomUpsertOrderedScan from 26GB to:
Peak tmalloc memory during test : 13825 MiB
Peak root mem tracker memory during test : 13126 MiB
Decreasing memory used over the limit from 18 to 5 GB.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/ordered_scan_large_cells-test.cc
M src/kudu/tserver/tablet_service.cc
19 files changed, 375 insertions(+), 32 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/2
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 2
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Zoltan Martonka has posted comments on this change. ( http://gerrit.cloudera.org:8080/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 6:
I thing a good way to address the issue of clearing/increasing back the batch size or the “veary rare big cells” is
the following:
In the commit I describe the problem why batch sizing can’t be done read time. However the “Throw away surpluss cells” aproach is very light if we never hit the limit.
So I would like to add this logic to run in case batching is set to AUTO or MANUAL. This way:
+ If batching is of -> everything works the same, no changes (only 64k cells).
+ Auto batching -> Batch size is set pessimistically, so the scan time downsizing problem is never hit, and its additional “ok size branch” code is negligible.
+ Manual batch size setting:
— too low batch size -> Just slow, because there will be many scan requests.
— High batch size cap with rare big rows -> Faster that auto batching.
— High batch size cap with frequent or “next to each other" big rows (Operator set a wrong manual value) -> We hit the occasional scan time downsizing. Wich causes us to reread disk from next batch. However this is only bad for sum cpu/disk usage over the whole scan, but still no RISK for OOM.
I thing this would be a safe and robust way to do it, but its a complex change.
I will make a separate commit for it building on top of this commit.
--
To view, visit http://gerrit.cloudera.org:8080/24901
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 6
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Mon, 26 Oct 2026 13:04:57 +0000
Gerrit-HasComments: No
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Zoltan Martonka (Code Review)" <ge...@cloudera.org>.
Hello Marton Greber, Alexey Serbin, Kurt Deschler, Ashwani Raina, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
https://gerrit.cloudera.org/24901
to look at the new patch set (#8).
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
KUDU-3812 Add option to allow huge cells.
The current static 128 regular and 1024 merge row count is incompatible
with huge cells.
If we would like to allow huge cells (up to 1MB), then we have to be able
to change these values dynamically. However, we must do it in a way that
does not affect the performance of read and write operations against
tables with regular/smaller cells.
This is not trivial without having any info on cell sizes previously.
Decreasing the batch size unconditionally would hit the performance of
small data tablets. If we try to do it dynamically, then there is the
following problem:
+ Imagine we have a table schema:
- pk : int
- s1 : string <-contains 50kb strings
- s2 : string <-contains mostly 50kb, but some 1 MB strings.
+ We send a scan request, which does the following:
- we determine the 128 pks.
- we read 128 values of s1 from the columnar data. This is OK by current
logic, no need to downsize.
- we read some (let's say 20) small values of s2, until we suddenly
encounter multiple 1 MB cells.
At this point we already have around 7 MB data loaded into the server's
memory. No matter how we restructure the code at this point, if we downsize
the sent back batch to x = 21-22 rows, we have to either:
1. Throw away 128 - x values of s1 from the server's memory, so we will
fetch them from disk during the next continued scan request again.
2. Keep the 128 - x values of s1 in the server's memory. Attached to the
scan session.
Neither of them is an acceptable solution. 2. is bad, because we can have
many scan sessions, so keeping things in memory between batches can
increase risk of OOM condition.
One solution is to allow for an automatic batch sizing option of tables,
and also allow setting a higher cell size limit on tables, where the option
is turned on.
Each tablet gets an optional batch size upper limit, that can be
automatically updated at write time.
If a tablet does not have an override, the only performance impact is a
quick check for the attribute (only a single int atomic load).
If it has an upper limit for batching, it will be applied both on regular
and merge buffer sizes.
The original buffer sizes differ, because merge buffer was tuned more with
small rows in mind, while the regular buffer size is basically:
--scanner_max_batch_size_bytes / --max_cell_size_bytes = 128
However, when rows are starting to get big, using the same limit makes
sense.
This reduces memory usage in TestRandomUpsertOrderedScan from 18 GB to
9.8 GB.
Decreasing memory used over the limit from ~10 GB to 1.8 GB.
Remaining TODOs:
+ Handle update row operations:
Updates might contain values only for some of the columns. Handling it on
a best effort basis is straightforward. But with tests, it is another
hundreds of lines of code. So there will be a follow up patch for it.
+ Allow for auto batch sizing to be turned off and the batch size to be
decreased:
This is a risky task due to the number of ways log replay can go wrong.
It is indeed worth a separate commit.
Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
---
M src/kudu/common/common.proto
M src/kudu/common/generic_iterators.cc
M src/kudu/common/generic_iterators.h
M src/kudu/common/row_operations.cc
M src/kudu/common/row_operations.h
M src/kudu/common/wire_protocol-test.cc
M src/kudu/common/wire_protocol.cc
M src/kudu/common/wire_protocol.h
M src/kudu/integration-tests/CMakeLists.txt
M src/kudu/integration-tests/alter_table-test.cc
M src/kudu/integration-tests/ordered_scan_large_cells-itest.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/tablet/local_tablet_writer.h
M src/kudu/tablet/metadata.proto
M src/kudu/tablet/ops/write_op.cc
M src/kudu/tablet/rowset.cc
M src/kudu/tablet/rowset.h
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/tablet.h
M src/kudu/tablet/tablet_bootstrap.cc
M src/kudu/tablet/tablet_metadata.cc
M src/kudu/tablet/tablet_metadata.h
M src/kudu/tserver/tablet_service.cc
23 files changed, 1,259 insertions(+), 121 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/01/24901/8
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
[kudu-CR] KUDU-3812 Add option to allow huge cells.
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( https://gerrit.cloudera.org/24901 )
Change subject: KUDU-3812 Add option to allow huge cells.
......................................................................
Patch Set 8: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3348/ : FAILURE
--
To view, visit https://gerrit.cloudera.org/24901
To unsubscribe, visit https://gerrit.cloudera.org/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8a736933cbe58b7a174fac629b0e8b3d3bd72c18
Gerrit-Change-Number: 24901
Gerrit-PatchSet: 8
Gerrit-Owner: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Kurt Deschler <kd...@cloudera.com>
Gerrit-Reviewer: Marton Greber <gr...@gmail.com>
Gerrit-Reviewer: Zoltan Martonka <zm...@cloudera.com>
Gerrit-Comment-Date: Thu, 05 Nov 2026 17:56:48 +0000
Gerrit-HasComments: No