@@ -303,7 +303,7 @@ protected HStore(final HRegion region, final ColumnFamilyDescriptor family,
303303 List <HStoreFile > hStoreFiles = loadStoreFiles (warmup );
304304 // Move the storeSize calculation out of loadStoreFiles() method, because the secondary read
305305 // replica's refreshStoreFiles() will also use loadStoreFiles() to refresh its store files and
306- // update the storeSize in the completeCompaction(.. ) finally (just like compaction) , so
306+ // update the storeSize in the refreshStoreSizeAndTotalBytes( ) finally (just like compaction) , so
307307 // no need calculate the storeSize twice.
308308 this .storeSize .addAndGet (getStorefilesSize (hStoreFiles , sf -> true ));
309309 this .totalUncompressedBytes .addAndGet (getTotalUncompressedBytes (hStoreFiles ));
@@ -727,7 +727,7 @@ private void refreshStoreFilesInternal(Collection<StoreFileInfo> newFiles) throw
727727 region .getMVCC ().advanceTo (this .getMaxSequenceId ().getAsLong ());
728728 }
729729
730- completeCompaction ( toBeRemovedStoreFiles );
730+ refreshStoreSizeAndTotalBytes ( );
731731 }
732732
733733 protected HStoreFile createStoreFileAndReader (final Path p ) throws IOException {
@@ -1557,7 +1557,7 @@ protected List<HStoreFile> doCompaction(CompactionRequestImpl cr,
15571557 long outputBytes = getTotalSize (sfs );
15581558
15591559 // At this point the store will use new files for all new scanners.
1560- completeCompaction ( filesToCompact ); // update store size.
1560+ refreshStoreSizeAndTotalBytes ( ); // update store size.
15611561
15621562 long now = EnvironmentEdgeManager .currentTime ();
15631563 if (region .getRegionServerServices () != null
@@ -1783,7 +1783,7 @@ public void replayCompactionMarker(CompactionDescriptor compaction, boolean pick
17831783 LOG .info ("Replaying compaction marker, replacing input files: " +
17841784 inputStoreFiles + " with output files : " + outputStoreFiles );
17851785 this .replaceStoreFiles (inputStoreFiles , outputStoreFiles );
1786- this .completeCompaction ( inputStoreFiles );
1786+ this .refreshStoreSizeAndTotalBytes ( );
17871787 }
17881788 }
17891789
@@ -1836,7 +1836,7 @@ public void compactRecentForTestingAssumingDefaultPolicy(int N) throws IOExcepti
18361836 this .getCoprocessorHost ().postCompact (this , sf , null , null , null );
18371837 }
18381838 replaceStoreFiles (filesToCompact , Collections .singletonList (sf ));
1839- completeCompaction ( filesToCompact );
1839+ refreshStoreSizeAndTotalBytes ( );
18401840 }
18411841 } finally {
18421842 synchronized (filesCompacting ) {
@@ -2024,7 +2024,7 @@ private void removeUnneededFiles() throws IOException {
20242024 Collection <HStoreFile > newFiles = Collections .emptyList (); // No new files.
20252025 writeCompactionWalRecord (delSfs , newFiles );
20262026 replaceStoreFiles (delSfs , newFiles );
2027- completeCompaction ( delSfs );
2027+ refreshStoreSizeAndTotalBytes ( );
20282028 LOG .info ("Completed removal of " + delSfs .size () + " unnecessary (expired) file(s) in "
20292029 + this + "; total size is "
20302030 + TraditionalBinaryPrefix .long2String (storeSize .get (), "" , 1 ));
@@ -2066,10 +2066,8 @@ private void validateStoreFile(Path path) throws IOException {
20662066
20672067 /**
20682068 * Update counts.
2069- * @param compactedFiles list of files that were compacted
20702069 */
2071- protected void completeCompaction (Collection <HStoreFile > compactedFiles )
2072- // Rename this method! TODO.
2070+ protected void refreshStoreSizeAndTotalBytes ()
20732071 throws IOException {
20742072 this .storeSize .set (0L );
20752073 this .totalUncompressedBytes .set (0L );
0 commit comments