kadirozde commented on code in PR #5545:
URL: https://github.com/apache/hbase/pull/5545#discussion_r1411228804
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java:
##########
@@ -135,11 +136,17 @@ public static List<StoreFileScanner>
getScannersForStoreFiles(Collection<HStoreF
for (HStoreFile file : files) {
// The sort function needs metadata so we need to open reader first
before sorting the list.
file.initReader();
- sortedFiles.add(file);
+ if (onlyLatestVersion) {
+ if (file.hasLatestVersion()) {
+ sortedFiles.add(file);
+ }
+ } else {
+ sortedFiles.add(file);
+ }
}
boolean succ = false;
try {
- for (int i = 0, n = files.size(); i < n; i++) {
+ for (int i = 0, n = files.size(); i < n && !sortedFiles.isEmpty(); i++) {
Review Comment:
Yes, because we skip the files with older cell versions and delete markers
for the regular scans with max versions = 1.
--
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]