accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject [accumulo] branch 1.9 updated: Improved comments for #559 changes (#566)
Date Thu, 19 Jul 2018 18:40:28 GMT
This is an automated email from the ASF dual-hosted git repository.

kturner pushed a commit to branch 1.9
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.9 by this push:
     new bffa3c4  Improved comments for #559 changes (#566)
bffa3c4 is described below

commit bffa3c4e1f246cf3a529c93a91c2346861007a30
Author: Keith Turner <keith@deenlo.com>
AuthorDate: Thu Jul 19 14:40:26 2018 -0400

    Improved comments for #559 changes (#566)
---
 .../org/apache/accumulo/tserver/tablet/Tablet.java | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 4dc19f2..9554b93 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -2471,6 +2471,22 @@ public class Tablet implements TabletCommitter {
   private volatile Set<DfsLogger> referencedLogs = Collections.emptySet();
 
   private synchronized void rebuildReferencedLogs() {
+    /*
+     * Each tablet has the following sets of WALogs. While a WALog exists in one set, garbage
+     * collection must be avoided.
+     *
+     * 1. WALogs for the active in memory map
+     *
+     * 2. WAlogs for the minor compacting in memory map
+     *
+     * 3. WAlogs for a newly minor compacted file that is being added to the metadata table.
+     *
+     * Set 1 is currentLogs. Set 2 is otherLogs. Set 3 only exist in referenced logs as a
side
+     * effect of not calling this method in beginClearingUnusedLogs() when otherLogs is cleared.
+     *
+     * Ensuring referencedLogs accurately tracks these sets ensures in use walogs are not
GCed.
+     */
+
     Builder<DfsLogger> builder = ImmutableSet.builder();
     builder.addAll(currentLogs);
     builder.addAll(otherLogs);
@@ -2505,9 +2521,10 @@ public class Tablet implements TabletCommitter {
       }
 
       otherLogs = Collections.emptySet();
-      // Do NOT call rebuildReferenedLogs() here as that could cause walogs to be GCed before
the
-      // minc rfile is written to metadata table (see #539). The clearing of otherLogs is
reflected
-      // in refererncedLogs when finishClearingUnusedLogs() calls rebuildReferenedLogs().
+      // Intentionally NOT calling rebuildReferenedLogs() here as that could cause GC of
in use
+      // walogs(see #539). The clearing of otherLogs is reflected in refererncedLogs when
+      // finishClearingUnusedLogs() calls rebuildReferenedLogs(). See the comments in
+      // rebuildReferenedLogs() for more info.
 
       if (unusedLogs.size() > 0)
         removingLogs = true;


Mime
View raw message