mini666 opened a new pull request, #7988:
URL: https://github.com/apache/hbase/pull/7988
## Summary
`Scan.setBatch()` validates that the scan does not have a filter with
`hasFilterRow()=true`, throwing `IncompatibleFilterException` if it does.
However, `Scan.setFilter()` does not perform the reverse check against an
existing batch setting.
This allows creating an invalid Scan by calling `setBatch()` before
`setFilter()`, bypassing the validation:
```java
// This correctly throws IncompatibleFilterException
Scan scan = new Scan();
scan.setFilter(new PageFilter(10));
scan.setBatch(5); // throws
// This silently creates the same invalid combination
Scan scan = new Scan();
scan.setBatch(5);
scan.setFilter(new PageFilter(10)); // no validation
```
Fix
Added validation in Scan.setFilter() to throw IncompatibleFilterException
when a filter with hasFilterRow()=true is set on a scan that already has batch
configured.
Jira
https://issues.apache.org/jira/browse/HBASE-30033
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]