Affects Version/s: None
Fix Version/s: None
We are observing below logs for a long-running scan:
From which we found the "number_of_rows" is as big as Integer.MAX_VALUE
And we also observed a long filter list on the customized scan. After checking application code we confirmed that there's no Scan.setCaching or hbase.client.scanner.caching setting on client side, so it turns out using the default value the caching for Scan will be Integer.MAX_VALUE, which is really a big surprise.
After checking code and commit history, I found it's
HBASE-11544 which changes HConstants.DEFAULT_HBASE_CLIENT_SCANNER_CACHING from 100 to Integer.MAX_VALUE, and from the release note there I could see below notation:
And I'm afraid this lacks of consideration of the case of scan with filters, which may involve many rows but only return with a small result.
What's more, we still have below comment/code in Scan.java
But actually the implementation does not follow (instead of no caching, we are caching Integer.MAX_VALUE...).
So here I'd like to bring up two points:
1. Change back the default value of HConstants.DEFAULT_HBASE_CLIENT_SCANNER_CACHING to some small value like 128
2. Reenforce the semantic of "no caching"