ACCUMULO-3249 When recovery of a tablet doesn't recover anything from a WAL, we must ignore it.
Marking a WAL as closed when recovery doesn't use any mutations from the WAL is an incorrect assertion. Even though the current Tablet didn't find any mutations from this WAL doesn't mean that other Tablets also won't find any mutations. Even worse, other Tablets could *continue to use* this WAL for new data. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ceb131cb Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ceb131cb Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ceb131cb Branch: refs/heads/master Commit: ceb131cb0702dddd01a62de5d4d1fea40b9cb172 Parents: ebc4a04 Author: Josh Elser <[email protected]> Authored: Wed Oct 22 14:22:15 2014 -0400 Committer: Josh Elser <[email protected]> Committed: Thu Oct 23 11:18:59 2014 -0400 ---------------------------------------------------------------------- .../java/org/apache/accumulo/tserver/tablet/Tablet.java | 9 --------- 1 file changed, 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/ceb131cb/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java ---------------------------------------------------------------------- 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 85af110..8ba72b7 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 @@ -621,15 +621,6 @@ public class Tablet implements TabletCommitter { log.debug("No replayed mutations applied, removing unused entries for " + extent); MetadataTableUtil.removeUnusedWALEntries(extent, logEntries, tabletServer.getLock()); - // Ensure that we write a record marking each WAL as requiring replication to make sure we don't abandon the data - if (ReplicationConfigurationUtil.isEnabled(extent, tabletServer.getTableConfiguration(extent))) { - Status status = StatusUtil.fileClosed(); - for (LogEntry logEntry : logEntries) { - log.debug("Writing closed status to metadata table for " + logEntry.logSet + " " + ProtobufUtil.toString(status)); - ReplicationTableUtil.updateFiles(SystemCredentials.get(), extent, logEntry.logSet, status); - } - } - logEntries.clear(); } else if (ReplicationConfigurationUtil.isEnabled(extent, tabletServer.getTableConfiguration(extent))) { // The logs are about to be re-used, we need to record that they have data for this extent,
