kadirozde commented on code in PR #5545: URL: https://github.com/apache/hbase/pull/5545#discussion_r1602560727
########## hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFileManager.java: ########## @@ -48,17 +52,38 @@ class DefaultStoreFileManager implements StoreFileManager { private final CompactionConfiguration comConf; private final int blockingFileCount; private final Comparator<HStoreFile> storeFileComparator; - /** - * List of store files inside this store. This is an immutable list that is atomically replaced - * when its contents change. - */ - private volatile ImmutableList<HStoreFile> storefiles = ImmutableList.of(); + + static class StoreFileList { + /** + * List of store files inside this store. This is an immutable list that is atomically replaced + * when its contents change. + */ + final ImmutableList<HStoreFile> all; + /** + * List of store files that include the latest cells inside this store. This is an immutable + * list that is atomically replaced when its contents change. + */ + @Nullable + final ImmutableList<HStoreFile> live; + + StoreFileList(ImmutableList<HStoreFile> storeFiles, ImmutableList<HStoreFile> liveStoreFiles) { + this.all = storeFiles; + this.live = liveStoreFiles; + } + } + + private static final StoreFileList EMPTY_STORE_FILE_LIST = + new StoreFileList(ImmutableList.of(), null); + + private volatile StoreFileList storeFiles = EMPTY_STORE_FILE_LIST; Review Comment: Got it. I changed the code such that null is passed only when live tracking is disabled. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org