accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [17/50] [abbrv] git commit: ACCUMULO-2575 Add comment for critical ordering in gc with repl
Date Fri, 09 May 2014 15:28:55 GMT
ACCUMULO-2575 Add comment for critical ordering in gc with repl


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e9a75d13
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e9a75d13
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e9a75d13

Branch: refs/heads/ACCUMULO-378
Commit: e9a75d13943669ee3b8152345d4f0b1126c16645
Parents: f4f7c94
Author: Josh Elser <elserj@apache.org>
Authored: Sat May 3 11:35:34 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat May 3 11:35:34 2014 -0400

----------------------------------------------------------------------
 .../gc/replication/RemoveCompleteReplicationRecords.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e9a75d13/server/gc/src/main/java/org/apache/accumulo/gc/replication/RemoveCompleteReplicationRecords.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/replication/RemoveCompleteReplicationRecords.java
b/server/gc/src/main/java/org/apache/accumulo/gc/replication/RemoveCompleteReplicationRecords.java
index 1b40cd6..b46416c 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/replication/RemoveCompleteReplicationRecords.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/replication/RemoveCompleteReplicationRecords.java
@@ -117,8 +117,8 @@ public class RemoveCompleteReplicationRecords implements Runnable {
    * when that {@link Status} is fully replicated and closed, as defined by {@link StatusUtil#isSafeForRemoval(Status)}.
    * @param conn A Connector
    * @param bs A BatchScanner to read replication status records from
-   * @param bw A BatchWriter to write deletes to the metadata table
-   * @param bw A BatchWriter to write deletes to the replication table
+   * @param metaBw A BatchWriter to write deletes to the metadata table
+   * @param replBw A BatchWriter to write deletes to the replication table
    * @return Number of records removed
    */
   protected long removeCompleteRecords(Connector conn, BatchScanner bs, BatchWriter metaBw,
BatchWriter replBw) {
@@ -148,6 +148,8 @@ public class RemoveCompleteReplicationRecords implements Runnable {
 
         log.debug("Issuing delete for {}", k.toStringNoTruncate());
 
+        // *Must* delete from metadata table first, otherwise we risk re-creating the 
+        // record in the replication table and double-replicating the data
         Mutation metaMutation = new Mutation(ReplicationSection.getRowPrefix() + row.toString());
         metaMutation.putDelete(ReplicationSection.COLF, colq);
         try {


Mime
View raw message