Apache9 commented on code in PR #6974:
URL: https://github.com/apache/hbase/pull/6974#discussion_r2100537785
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStoreFile.java:
##########
@@ -514,18 +514,23 @@ private void open() throws IOException {
comparator = initialReader.getComparator();
}
+ public void initReader() throws IOException {
+ initReader(false);
+ }
+
/**
* Initialize the reader used for pread.
*/
- public void initReader() throws IOException {
- if (initialReader == null) {
+ public void initReader(boolean reopen) throws IOException {
+ if (initialReader == null || reopen) {
synchronized (this) {
- if (initialReader == null) {
+ if (initialReader == null || reopen) {
+ boolean evictOnClose = cacheConf == null ||
cacheConf.shouldEvictOnClose();
Review Comment:
Why move this line here?
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java:
##########
@@ -255,18 +255,14 @@ public StoreScanner(HStore store, ScanInfo scanInfo, Scan
scan, NavigableSet<byt
List<KeyValueScanner> scanners = null;
try {
- // Pass columns to try to filter out unnecessary StoreFiles.
- scanners = selectScannersFrom(store,
- store.getScanners(cacheBlocks, scanUsePread, false, matcher,
scan.getStartRow(),
- scan.includeStartRow(), scan.getStopRow(), scan.includeStopRow(),
this.readPt,
- isOnlyLatestVersionScan(scan)));
-
- // Seek all scanners to the start of the Row (or if the exact matching
row
- // key does not exist, then to the start of the next matching Row).
- // Always check bloom filter to optimize the top row seek for delete
- // family marker.
- seekScanners(scanners, matcher.getStartKey(), explicitColumnQuery &&
lazySeekEnabledGlobally,
- parallelSeekEnabled);
+ try {
+ scanners = getScannersAndSeek(false);
+ } catch (IOException e) {
+ // If we fail to read the store files,
+ // we should close and reopen the store file readers to refresh
metadata
+ LOG.info("Reopen StoreScanner", e);
+ scanners = getScannersAndSeek(true);
Review Comment:
We want to retry for all types of IOException? Not some specific ones?
--
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]