You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Ashwani Raina (Code Review)" <ge...@cloudera.org> on 2026/10/19 13:29:38 UTC
[kudu-CR] [client] Enhance client side checks for invalid response
Ashwani Raina has uploaded this change for review. ( http://gerrit.cloudera.org:8080/25148
Change subject: [client] Enhance client side checks for invalid response
......................................................................
[client] Enhance client side checks for invalid response
The patch fixes three unverified accesses that could cause crash on
client side:
- In Batcher::ProcessWriteResponse, the per_row_errors loop uses a
server-supplied row_index as a direct index into rpc.ops() and
afterwards std::moves write_op out of the referenced in-flight RPCs.
No guard exists for the case where write_op is already null - either
due to invalid reponse from a malicious server or any other reason,
which could cause undefined behaviour at the op->ToString() call
(null dereference). A null check on write_op is inserted immediately
after the existing bounds check, before std::move.
- Response entry's rpc_addresses are accessed directly, with no check
that the optional registration sub-message exists or that it
contains any RPC addresses. Sequential guards are added before the
access and an appropriate error message (Status::Corruption) is sent
back to the caller.
- Master-supplied ts info index with no bounds check could result in
undefined behaviour / crash in a release build if the index is out of
range. A bounds check is added before the access that returns
Status::Corruption with the bad index and the actual count. This
mirrors the identical guard already present in meta_cache.cc for the
same field.
Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Partially-Generated-By: Cursor <cu...@cursor.com>
---
M src/kudu/client/batcher.cc
M src/kudu/client/batcher.h
M src/kudu/client/client.cc
3 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/25148/1
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 1
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Gabriella Lotz, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/25148
to look at the new patch set (#3).
Change subject: [client] Enhance client side checks for invalid response
......................................................................
[client] Enhance client side checks for invalid response
The patch fixes three unverified accesses that could cause crash on
client side:
- In Batcher::ProcessWriteResponse, the per_row_errors loop uses a
server-supplied row_index as a direct index into rpc.ops() and
afterwards std::moves write_op out of the referenced in-flight RPCs.
No guard exists for the case where write_op is already null - either
due to invalid response from a malicious server or any other reason,
which could cause undefined behaviour at the op->ToString() call
(null dereference). A null check on write_op is inserted immediately
after the existing bounds check, before std::move.
- Response entry's rpc_addresses are accessed directly, with no check
that the optional registration sub-message exists or that it
contains any RPC addresses. Sequential guards are added before the
access and an appropriate error message (Status::Corruption) is sent
back to the caller.
- Master-supplied ts info index with no bounds check could result in
undefined behaviour / crash in a release build if the index is out of
range. A bounds check is added before the access that returns
Status::Corruption with the bad index and the actual count. This
mirrors the identical guard already present in meta_cache.cc for the
same field.
Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Partially-Generated-By: Cursor <cu...@cursor.com>
---
M src/kudu/client/batcher.cc
M src/kudu/client/batcher.h
M src/kudu/client/client.cc
3 files changed, 30 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/25148/3
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 1:
(6 comments)
http://gerrit.cloudera.org:8080/#/c/25148/1//COMMIT_MSG
Commit Message:
PS1:
Any chance to add a test that would trigger invalid responses this patch tries to protect against or such an error response is completely theoretical issue apart from having a malicious server?
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/batcher.cc
File src/kudu/client/batcher.cc:
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/batcher.cc@974
PS1, Line 974: << ": write operation is missing (possible causes: duplicate"
: " row index in response, write op already released due to"
: " a prior RPC-level failure, or write op was never set)";
I don't think any of these reasons is a possibility with current code base. In that sense, it's better to drop this part since it's only increases compiled binary size and don't provide much value to make this error actionable.
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc
File src/kudu/client/client.cc:
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@634
PS1, Line 634: const ListTabletServersResponsePB_Entry& e = resp.servers(i);
Absence of this field would be a bug on the server side: add a DCHECK() in addition to the 'if() {...}' check.
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@635
PS1, Line 635: !e.has_registration()
Wrap this into PREDICT_FALSE?
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@640
PS1, Line 640: if (e.registration().rpc_addresses_size() == 0) {
Ditto with PREDICT_FALSE
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@644
PS1, Line 644: }
Ditto with DCHECK()
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 1
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 19 Oct 2026 14:56:52 +0000
Gerrit-HasComments: Yes
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 1:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3128/
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 1
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 19 Oct 2026 13:29:47 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Gabriella Lotz (Code Review)" <ge...@cloudera.org>.
Gabriella Lotz has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 2:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/25148/2//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/25148/2//COMMIT_MSG@15
PS2, Line 15: reponse
nit: fix typo
http://gerrit.cloudera.org:8080/#/c/25148/2/src/kudu/client/client.cc
File src/kudu/client/client.cc:
http://gerrit.cloudera.org:8080/#/c/25148/2/src/kudu/client/client.cc@646
PS2, Line 646: return Status::Corruption(Substitute(
On line 750, the same condition (rpc_addresses_size() == 0) returns IllegalState, and here it returns Corruption. Is there a reason the two statuses differ? If not, would it make sense to use the same one in both places?
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 2
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Oct 2026 14:19:35 +0000
Gerrit-HasComments: Yes
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/25148
to look at the new patch set (#2).
Change subject: [client] Enhance client side checks for invalid response
......................................................................
[client] Enhance client side checks for invalid response
The patch fixes three unverified accesses that could cause crash on
client side:
- In Batcher::ProcessWriteResponse, the per_row_errors loop uses a
server-supplied row_index as a direct index into rpc.ops() and
afterwards std::moves write_op out of the referenced in-flight RPCs.
No guard exists for the case where write_op is already null - either
due to invalid reponse from a malicious server or any other reason,
which could cause undefined behaviour at the op->ToString() call
(null dereference). A null check on write_op is inserted immediately
after the existing bounds check, before std::move.
- Response entry's rpc_addresses are accessed directly, with no check
that the optional registration sub-message exists or that it
contains any RPC addresses. Sequential guards are added before the
access and an appropriate error message (Status::Corruption) is sent
back to the caller.
- Master-supplied ts info index with no bounds check could result in
undefined behaviour / crash in a release build if the index is out of
range. A bounds check is added before the access that returns
Status::Corruption with the bad index and the actual count. This
mirrors the identical guard already present in meta_cache.cc for the
same field.
Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Partially-Generated-By: Cursor <cu...@cursor.com>
---
M src/kudu/client/batcher.cc
M src/kudu/client/batcher.h
M src/kudu/client/client.cc
3 files changed, 27 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/25148/2
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 2
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 2: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3135/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 2
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Oct 2026 14:39:40 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 3: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3141/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 22 Oct 2026 09:38:51 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 3: Verified+1
unrelated failures
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 22 Oct 2026 09:56:15 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has removed a vote on this change.
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Removed Verified-1 by Kudu Jenkins (120)
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: deleteVote
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 2:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3135/
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 2
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Oct 2026 13:22:44 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
[client] Enhance client side checks for invalid response
The patch fixes three unverified accesses that could cause crash on
client side:
- In Batcher::ProcessWriteResponse, the per_row_errors loop uses a
server-supplied row_index as a direct index into rpc.ops() and
afterwards std::moves write_op out of the referenced in-flight RPCs.
No guard exists for the case where write_op is already null - either
due to invalid response from a malicious server or any other reason,
which could cause undefined behaviour at the op->ToString() call
(null dereference). A null check on write_op is inserted immediately
after the existing bounds check, before std::move.
- Response entry's rpc_addresses are accessed directly, with no check
that the optional registration sub-message exists or that it
contains any RPC addresses. Sequential guards are added before the
access and an appropriate error message (Status::Corruption) is sent
back to the caller.
- Master-supplied ts info index with no bounds check could result in
undefined behaviour / crash in a release build if the index is out of
range. A bounds check is added before the access that returns
Status::Corruption with the bad index and the actual count. This
mirrors the identical guard already present in meta_cache.cc for the
same field.
Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Partially-Generated-By: Cursor <cu...@cursor.com>
Reviewed-on: http://gerrit.cloudera.org:8080/25148
Tested-by: Ashwani Raina <ar...@gmail.com>
Reviewed-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/client/batcher.cc
M src/kudu/client/batcher.h
M src/kudu/client/client.cc
3 files changed, 30 insertions(+), 4 deletions(-)
Approvals:
Ashwani Raina: Verified
Alexey Serbin: Looks good to me, approved
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 4
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 3:
Build Started http://jenkins.kudu.apache.org/job/pre_commit/3141/
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 22 Oct 2026 08:54:39 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 2:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/25148/2//COMMIT_MSG
Commit Message:
http://gerrit.cloudera.org:8080/#/c/25148/2//COMMIT_MSG@15
PS2, Line 15: reponse
> nit: fix typo
Done
http://gerrit.cloudera.org:8080/#/c/25148/2/src/kudu/client/client.cc
File src/kudu/client/client.cc:
http://gerrit.cloudera.org:8080/#/c/25148/2/src/kudu/client/client.cc@646
PS2, Line 646: return Status::Corruption(Substitute(
> On line 750, the same condition (rpc_addresses_size() == 0) returns Illegal
Both are the same situations where master is sending back something that is structurally invalid. It should definitely be a Status::Corruption.
The same logic is applicable to line 736-740 but changing that is outside the scope of this patch.
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 2
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 22 Oct 2026 08:54:54 +0000
Gerrit-HasComments: Yes
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 1:
(6 comments)
http://gerrit.cloudera.org:8080/#/c/25148/1//COMMIT_MSG
Commit Message:
PS1:
> Any chance to add a test that would trigger invalid responses this patch tr
The patch is mostly defensive checks (against malicious server) and checks to keep consistent pattern across callers. So there is not much value in adding a test.
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/batcher.cc
File src/kudu/client/batcher.cc:
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/batcher.cc@974
PS1, Line 974: << ": write operation is missing (possible causes: duplicate"
: " row index in response, write op already released due to"
: " a prior RPC-level failure, or write op was never set)";
> I don't think any of these reasons is a possibility with current code base.
Done
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc
File src/kudu/client/client.cc:
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@634
PS1, Line 634: const ListTabletServersResponsePB_Entry& e = resp.servers(i);
> Absence of this field would be a bug on the server side: add a DCHECK() in
Done
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@635
PS1, Line 635: !e.has_registration()
> Wrap this into PREDICT_FALSE?
Done
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@640
PS1, Line 640: if (e.registration().rpc_addresses_size() == 0) {
> Ditto with PREDICT_FALSE
Done
http://gerrit.cloudera.org:8080/#/c/25148/1/src/kudu/client/client.cc@644
PS1, Line 644: }
> Ditto with DCHECK()
Done
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 1
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Wed, 21 Oct 2026 13:21:50 +0000
Gerrit-HasComments: Yes
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 3
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Gabriella Lotz <lo...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Thu, 22 Oct 2026 16:15:58 +0000
Gerrit-HasComments: No
[kudu-CR] [client] Enhance client side checks for invalid response
Posted by "Kudu Jenkins (Code Review)" <ge...@cloudera.org>.
Kudu Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/25148 )
Change subject: [client] Enhance client side checks for invalid response
......................................................................
Patch Set 1: Verified-1
Build Failed
http://jenkins.kudu.apache.org/job/pre_commit/3128/ : FAILURE
--
To view, visit http://gerrit.cloudera.org:8080/25148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2034b1686d2d8dac1e21b38103303e8c1005e16a
Gerrit-Change-Number: 25148
Gerrit-PatchSet: 1
Gerrit-Owner: Ashwani Raina <ar...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Mon, 19 Oct 2026 14:35:02 +0000
Gerrit-HasComments: No