You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2015/04/25 01:20:55 UTC
[09/34] accumulo git commit: ACCUMULO-3423 fixed replication bugs
with recent refactorings in StatusUtil
ACCUMULO-3423 fixed replication bugs with recent refactorings in StatusUtil
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/31ee26b8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/31ee26b8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/31ee26b8
Branch: refs/heads/master
Commit: 31ee26b8ac41844f2a647a5d1484f47da731872a
Parents: 4635de8
Author: Eric C. Newton <er...@gmail.com>
Authored: Wed Mar 11 14:37:39 2015 -0400
Committer: Eric C. Newton <er...@gmail.com>
Committed: Wed Mar 11 14:37:39 2015 -0400
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/core/replication/StatusUtil.java | 2 +-
.../java/org/apache/accumulo/tserver/log/TabletServerLogger.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/31ee26b8/core/src/main/java/org/apache/accumulo/core/replication/StatusUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/replication/StatusUtil.java b/core/src/main/java/org/apache/accumulo/core/replication/StatusUtil.java
index d8ec403..cdb6963 100644
--- a/core/src/main/java/org/apache/accumulo/core/replication/StatusUtil.java
+++ b/core/src/main/java/org/apache/accumulo/core/replication/StatusUtil.java
@@ -155,7 +155,7 @@ public class StatusUtil {
/**
* @return A {@link Status} for an open file of unspecified length, all of which needs replicating.
*/
- public static Status openWithUnknownLength(long timeCreated) {
+ public static synchronized Status openWithUnknownLength(long timeCreated) {
return INF_END_REPLICATION_STATUS_BUILDER.setCreatedTime(timeCreated).build();
}
http://git-wip-us.apache.org/repos/asf/accumulo/blob/31ee26b8/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index 46101c1..498cbdd 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@ -319,7 +319,7 @@ public class TabletServerLogger {
// Need to release
KeyExtent extent = commitSession.getExtent();
if (ReplicationConfigurationUtil.isEnabled(extent, tserver.getTableConfiguration(extent))) {
- Status status = StatusUtil.fileCreated(System.currentTimeMillis());
+ Status status = StatusUtil.openWithUnknownLength(System.currentTimeMillis());
log.debug("Writing " + ProtobufUtil.toString(status) + " to metadata table for " + copy.getFileName());
// Got some new WALs, note this in the metadata table
ReplicationTableUtil.updateFiles(tserver, commitSession.getExtent(), copy.getFileName(), status);