Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/24845 )
Change subject: [tserver] Validate deprecated range predicate column type. ...................................................................... Patch Set 6: (6 comments) http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_server-test.cc File src/kudu/tserver/tablet_server-test.cc: http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_server-test.cc@3404 PS6, Line 3404: pred_a->mutable_lower_bound()->append(reinterpret_cast<const char*>(&invalid_address), : sizeof(invalid_address)); nit: please add a comment to explain why bother filling in lower bound with something random if the request is rejected upfront http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_server-test.cc@3406 PS6, Line 3406: // make sure we read something else than zero as the second half of the slice. This looks a bit off. Is this comment still relevant? http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_server-test.cc@3407 PS6, Line 3407: uint64_t forged_size = 8; : ColumnRangePredicatePB* pred_b = scan->add_deprecated_range_predicates(); : pred_b->mutable_column()->set_name(col_b_name); : pred_b->mutable_column()->set_type(INT64); : pred_b->mutable_column()->set_is_nullable(true); : pred_b->mutable_lower_bound()->append(reinterpret_cast<const char*>(&forged_size), sizeof(forged_size)); Why to add this second predicate? IIRC, pred_a exercises both the wrong column name and the wrong column type logic given this is a parameterized test scenario. http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_server-test.cc@3425 PS6, Line 3425: // vector<string> results; : // NO_FATALS(DrainScannerToStrings(resp.scanner_id(), schema_, &results)); Why to keep this (even as commented-out code)? I'd think this isn't needed since the rogue scan request was rejected with INVALID_SCAN_SPEC error, so there is no data returned with the response? http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_service.cc File src/kudu/tserver/tablet_service.cc: http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_service.cc@2777 PS6, Line 2777: // TODO: remove this once all clients have moved to ColumnPredicatePB and : // backwards compatibility can be broken. BTW, this TODO was added almost 10 years ago in Kudu 0.8.0, i.e. even before releasing Kudu 1.0. I think it's time to remove this 10 years later when we are already on Kudu 1.18.x and Kudu 1.19.0 is pending :) I think it's nice to have this changelist as-is: we need it to back-port the fix into 1.18.x and 1.17.x branches, but also consider putting a follow-up patch that addresses this TODO. http://gerrit.cloudera.org:8080/#/c/24845/6/src/kudu/tserver/tablet_service.cc@2793 PS6, Line 2793: . nit for here and elsewhere: since you are touching these messages anyway, please drop the period -- it doesn't add any value into the error message, it only increases the size of the compiled binary -- To view, visit http://gerrit.cloudera.org:8080/24845 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I82ad53ad2263ca587e81fd37d64cc7982060b0f1 Gerrit-Change-Number: 24845 Gerrit-PatchSet: 6 Gerrit-Owner: Zoltan Martonka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Zoltan Martonka <[email protected]> Gerrit-Comment-Date: Sat, 19 Sep 2026 01:08:04 +0000 Gerrit-HasComments: Yes
