@@ -271,8 +271,8 @@ public abstract class AbstractFSWAL<W extends WriterBase> implements WAL {
271271 private static final class WalProps {
272272
273273 /**
274- * Map the encoded region name to the highest sequence id. Contain all the regions it has
275- * entries of
274+ * Map the encoded region name to the highest sequence id.
275+ * <p/>Contains all the regions it has an entry for.
276276 */
277277 public final Map <byte [], Long > encodedName2HighestSequenceId ;
278278
@@ -628,9 +628,9 @@ public int getNumLogFiles() {
628628 }
629629
630630 /**
631- * If the number of un-archived WAL files is greater than maximum allowed, check the first
632- * (oldest) WAL file , and returns those regions which should be flushed so that it can be
633- * archived.
631+ * If the number of un-archived WAL files ('live' WALs) is greater than maximum allowed,
632+ * check the first (oldest) WAL, and return those regions which should be flushed so that
633+ * it can be let-go/' archived' .
634634 * @return regions (encodedRegionNames) to flush in order to archive oldest WAL file.
635635 */
636636 byte [][] findRegionsToForceFlush () throws IOException {
@@ -930,10 +930,6 @@ public void close() throws IOException {
930930 /**
931931 * updates the sequence number of a specific store. depending on the flag: replaces current seq
932932 * number if the given seq id is bigger, or even if it is lower than existing one
933- * @param encodedRegionName
934- * @param familyName
935- * @param sequenceid
936- * @param onlyIfGreater
937933 */
938934 @ Override
939935 public void updateStore (byte [] encodedRegionName , byte [] familyName , Long sequenceid ,
@@ -1057,7 +1053,7 @@ protected final void postSync(long timeInNanos, int handlerSyncs) {
10571053 }
10581054
10591055 protected final long stampSequenceIdAndPublishToRingBuffer (RegionInfo hri , WALKeyImpl key ,
1060- WALEdit edits , boolean inMemstore , boolean closeRegion , RingBuffer <RingBufferTruck > ringBuffer )
1056+ WALEdit edits , boolean inMemstore , RingBuffer <RingBufferTruck > ringBuffer )
10611057 throws IOException {
10621058 if (this .closed ) {
10631059 throw new IOException (
@@ -1071,7 +1067,7 @@ protected final long stampSequenceIdAndPublishToRingBuffer(RegionInfo hri, WALKe
10711067 ServerCall <?> rpcCall = RpcServer .getCurrentCall ().filter (c -> c instanceof ServerCall )
10721068 .filter (c -> c .getCellScanner () != null ).map (c -> (ServerCall ) c ).orElse (null );
10731069 try (TraceScope scope = TraceUtil .createTrace (implClassName + ".append" )) {
1074- FSWALEntry entry = new FSWALEntry (txid , key , edits , hri , inMemstore , closeRegion , rpcCall );
1070+ FSWALEntry entry = new FSWALEntry (txid , key , edits , hri , inMemstore , rpcCall );
10751071 entry .stampRegionSequenceId (we );
10761072 ringBuffer .get (txid ).load (entry );
10771073 } finally {
@@ -1109,13 +1105,13 @@ public OptionalLong getLogFileSizeIfBeingWritten(Path path) {
11091105
11101106 @ Override
11111107 public long appendData (RegionInfo info , WALKeyImpl key , WALEdit edits ) throws IOException {
1112- return append (info , key , edits , true , false );
1108+ return append (info , key , edits , true );
11131109 }
11141110
11151111 @ Override
1116- public long appendMarker (RegionInfo info , WALKeyImpl key , WALEdit edits , boolean closeRegion )
1112+ public long appendMarker (RegionInfo info , WALKeyImpl key , WALEdit edits )
11171113 throws IOException {
1118- return append (info , key , edits , false , closeRegion );
1114+ return append (info , key , edits , false );
11191115 }
11201116
11211117 /**
@@ -1139,17 +1135,17 @@ public long appendMarker(RegionInfo info, WALKeyImpl key, WALEdit edits, boolean
11391135 * @param key Modified by this call; we add to it this edits region edit/sequence id.
11401136 * @param edits Edits to append. MAY CONTAIN NO EDITS for case where we want to get an edit
11411137 * sequence id that is after all currently appended edits.
1142- * @param inMemstore Always true except for case where we are writing a region event marker, for
1143- * example, a compaction completion record into the WAL; in this case the entry is just
1144- * so we can finish an unfinished compaction -- it is not an edit for memstore.
1145- * @param closeRegion Whether this is a region close marker, i.e, the last wal edit for this
1146- * region on this region server. The WAL implementation should remove all the related
1147- * stuff, for example, the sequence id accounting .
1138+ * @param inMemstore Always true except for case where we are writing a region event meta
1139+ * marker edit, for example, a compaction completion record into the WAL or noting a
1140+ * Region Open event. In these cases the entry is just so we can finish an unfinished
1141+ * compaction after a crash when the new Server reads the WAL on recovery, etc. These
1142+ * transition event 'Markers' do not go via the memstore. When memstore is false,
1143+ * we presume a Marker event edit .
11481144 * @return Returns a 'transaction id' and <code>key</code> will have the region edit/sequence id
11491145 * in it.
11501146 */
1151- protected abstract long append (RegionInfo info , WALKeyImpl key , WALEdit edits , boolean inMemstore ,
1152- boolean closeRegion ) throws IOException ;
1147+ protected abstract long append (RegionInfo info , WALKeyImpl key , WALEdit edits , boolean inMemstore )
1148+ throws IOException ;
11531149
11541150 protected abstract void doAppend (W writer , FSWALEntry entry ) throws IOException ;
11551151
0 commit comments