Bankim Bhavsar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15540
Change subject: [rpc] Add RPC feature flag for Bloom filter predicate ...................................................................... [rpc] Add RPC feature flag for Bloom filter predicate If a newer C++ client communicates with an older tablet server that doesn't implement Bloom filter predicate push-down then the tablet server will simply drop the protobuf message. This change adds a RPC feature that'll report unsupported feature flag error if a newer client were to send Bloom filter predicate to an older tablet server. Thought about 2 options: 1) Add a new state using a counter in ScanSpec class that tracks whether any of the "predicates_" is a Bloom filter predicate. This state will need to be managed for addition, removal, merging of predicates etc. Pros: Efficient since it'll be a single check when sending RPC. Cons: Need to maintain additional state. 2) Don't add new state and use the existing "predicates_" map in ScanSpec class to determine whether any Bloom filter predicates are being sent. Pros: Doesn't require tracking any additional state. Cons: Can be inefficient with large number of predicates. Opted for option#2, since number of predicates on a table are expected to be small(unless the table has large number of columns) and doesn't require maintaining additional state. Tests: - In tablet_service.cc SupportsFeature() function commented out BLOOM_FILTER_PREDICATE and verified unit tests failed with unsupported feature flag 4 error log message. Change-Id: I87c6bac1e9f77a9ea306ab00404e5101a0c583b9 --- M src/kudu/client/scanner-internal.cc M src/kudu/common/scan_spec.cc M src/kudu/common/scan_spec.h M src/kudu/tserver/tablet_service.cc M src/kudu/tserver/tserver.proto 5 files changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/40/15540/1 -- To view, visit http://gerrit.cloudera.org:8080/15540 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I87c6bac1e9f77a9ea306ab00404e5101a0c583b9 Gerrit-Change-Number: 15540 Gerrit-PatchSet: 1 Gerrit-Owner: Bankim Bhavsar <ban...@cloudera.com>