chore: add filter size check on read row request#166
chore: add filter size check on read row request#166
Conversation
Currently, bigtable could only serve read row request with filter size of 20MB only. So adding this check to stop server request.
| */ | ||
| public Query filter(Filters.Filter filter) { | ||
| builder.setFilter(filter.toProto()); | ||
| Preconditions.checkNotNull(filter, "filter can't be null"); |
There was a problem hiding this comment.
Thanks for the review. Added test case for null check. I haven't added any test case for the filter size. I hope that should be fine.
There was a problem hiding this comment.
Apologies for being unclear, if you could add a test case for filter size as well that would be awesome :)
There was a problem hiding this comment.
I intentionally didn't add test case for that. Reason being the filter size needs to be more than 20MB, I thought that'd be a little large.
I would add unit test right away.
There was a problem hiding this comment.
Understood - LGTM. @igorbernstein2 any other thoughts?
Codecov Report
@@ Coverage Diff @@
## master #166 +/- ##
=========================================
Coverage ? 81.89%
Complexity ? 971
=========================================
Files ? 99
Lines ? 6025
Branches ? 331
=========================================
Hits ? 4934
Misses ? 912
Partials ? 179
Continue to review full report at Codecov.
|
Currently, bigtable could only serve read row requests with the filter size of 20MB. Adding this check to prevent failure.