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 2013/07/17 20:10:27 UTC
[1/4] git commit: ACCUMULO-1572 ignore connection lost;
eventually we'll get an session lost event
Updated Branches:
refs/heads/1.4.4-SNAPSHOT cd8ebfe89 -> 333062d27
refs/heads/1.5.1-SNAPSHOT c82c4316a -> 7b6172309
refs/heads/master 8b0f573e0 -> 5cfb88b21
ACCUMULO-1572 ignore connection lost; eventually we'll get an session lost event
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/333062d2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/333062d2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/333062d2
Branch: refs/heads/1.4.4-SNAPSHOT
Commit: 333062d27e25ee227365357bdca237b0c6912f68
Parents: cd8ebfe
Author: Eric Newton <er...@gmail.com>
Authored: Wed Jul 17 14:03:39 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Wed Jul 17 14:03:39 2013 -0400
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/server/zookeeper/ZooLock.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/333062d2/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
----------------------------------------------------------------------
diff --git a/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java b/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
index 277dad5..03e84a7 100644
--- a/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
+++ b/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
@@ -230,7 +230,7 @@ public class ZooLock implements Watcher {
lostLock(LockLossReason.LOCK_DELETED);
} else if (asyncLock != null && event.getType() == EventType.NodeDeleted && event.getPath().equals(path + "/" + asyncLock)) {
failedToAcquireLock();
- } else if (event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) {
+ } else if (event.getState() != KeeperState.Disconnected && event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) {
log.debug("Unexpected event watching lock node "+event+" "+asyncLockPath);
try {
Stat stat2 = zooKeeper.getStatus(asyncLockPath, this);
[2/4] git commit: ACCUMULO-1572 ignore connection lost;
eventually we'll get an session lost event
Posted by ec...@apache.org.
ACCUMULO-1572 ignore connection lost; eventually we'll get an session lost event
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7b617230
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7b617230
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7b617230
Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 7b617230979811d0e0ec8fffa6b633b70278c466
Parents: c82c431
Author: Eric Newton <er...@gmail.com>
Authored: Wed Jul 17 14:08:53 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Wed Jul 17 14:08:53 2013 -0400
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7b617230/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
index 961539a..fb2f3d8 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
@@ -235,7 +235,7 @@ public class ZooLock implements Watcher {
lostLock(LockLossReason.LOCK_DELETED);
} else if (asyncLock != null && event.getType() == EventType.NodeDeleted && event.getPath().equals(path + "/" + asyncLock)) {
failedToAcquireLock();
- } else if (event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) {
+ } else if (event.getState() != KeeperState.Disconnected && event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) {
log.debug("Unexpected event watching lock node "+event+" "+asyncLockPath);
try {
Stat stat2 = zooKeeper.getStatus(asyncLockPath, this);
@@ -349,6 +349,9 @@ public class ZooLock implements Watcher {
try { // set the watch on the parent node again
zooKeeper.getStatus(path, this);
watchingParent = true;
+ } catch (KeeperException.ConnectionLossException ex) {
+ // we can't look at the lock because we aren't connected, but our session is still good
+ log.warn("lost connection to zookeeper");
} catch (Exception ex) {
if (lock != null || asyncLock != null) {
lockWatcher.unableToMonitorLockNode(ex);
[3/4] git commit: ACCUMULO-1572 ignore connection lost;
eventually we'll get an session lost event
Posted by ec...@apache.org.
ACCUMULO-1572 ignore connection lost; eventually we'll get an session lost event
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7b617230
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7b617230
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7b617230
Branch: refs/heads/master
Commit: 7b617230979811d0e0ec8fffa6b633b70278c466
Parents: c82c431
Author: Eric Newton <er...@gmail.com>
Authored: Wed Jul 17 14:08:53 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Wed Jul 17 14:08:53 2013 -0400
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7b617230/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
index 961539a..fb2f3d8 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java
@@ -235,7 +235,7 @@ public class ZooLock implements Watcher {
lostLock(LockLossReason.LOCK_DELETED);
} else if (asyncLock != null && event.getType() == EventType.NodeDeleted && event.getPath().equals(path + "/" + asyncLock)) {
failedToAcquireLock();
- } else if (event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) {
+ } else if (event.getState() != KeeperState.Disconnected && event.getState() != KeeperState.Expired && (lock != null || asyncLock != null)) {
log.debug("Unexpected event watching lock node "+event+" "+asyncLockPath);
try {
Stat stat2 = zooKeeper.getStatus(asyncLockPath, this);
@@ -349,6 +349,9 @@ public class ZooLock implements Watcher {
try { // set the watch on the parent node again
zooKeeper.getStatus(path, this);
watchingParent = true;
+ } catch (KeeperException.ConnectionLossException ex) {
+ // we can't look at the lock because we aren't connected, but our session is still good
+ log.warn("lost connection to zookeeper");
} catch (Exception ex) {
if (lock != null || asyncLock != null) {
lockWatcher.unableToMonitorLockNode(ex);
[4/4] git commit: Merge branch '1.5.1-SNAPSHOT'
Posted by ec...@apache.org.
Merge branch '1.5.1-SNAPSHOT'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5cfb88b2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5cfb88b2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5cfb88b2
Branch: refs/heads/master
Commit: 5cfb88b219be5dbf0b4e0269593ca1424019d4f3
Parents: 8b0f573 7b61723
Author: Eric Newton <er...@gmail.com>
Authored: Wed Jul 17 14:09:52 2013 -0400
Committer: Eric Newton <er...@gmail.com>
Committed: Wed Jul 17 14:09:52 2013 -0400
----------------------------------------------------------------------
.../main/java/org/apache/accumulo/fate/zookeeper/ZooLock.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------