You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/10/02 18:15:41 UTC
[1/2] git commit: The the hostname on the replicated leveldb store
test so that the test works better on machines with weird DNS settings.
Updated Branches:
refs/heads/trunk afc022014 -> b720b264e
The the hostname on the replicated leveldb store test so that the test works better on machines with weird DNS settings.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/b720b264
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/b720b264
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/b720b264
Branch: refs/heads/trunk
Commit: b720b264e34885ed2cf94157ddd74349d2e7ac0b
Parents: 0b66abc
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Wed Oct 2 12:15:26 2013 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Wed Oct 2 12:15:36 2013 -0400
----------------------------------------------------------------------
.../org/apache/activemq/leveldb/test/ElectingLevelDBStoreTest.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/b720b264/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ElectingLevelDBStoreTest.java
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ElectingLevelDBStoreTest.java b/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ElectingLevelDBStoreTest.java
index b8293a6..34fbe08 100644
--- a/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ElectingLevelDBStoreTest.java
+++ b/activemq-leveldb-store/src/test/java/org/apache/activemq/leveldb/test/ElectingLevelDBStoreTest.java
@@ -224,6 +224,7 @@ public class ElectingLevelDBStoreTest {
store.setZkAddress("localhost:" + connector.getLocalPort());
store.setZkPath("/broker-stores");
store.setBrokerName("foo");
+ store.setHostname("localhost");
store.setBind("tcp://0.0.0.0:0");
return store;
}
[2/2] git commit: Fixing leveldb replication bug where loosing quorum
did not properly restart the master in a clean way.
Posted by ch...@apache.org.
Fixing leveldb replication bug where loosing quorum did not properly restart the master in a clean way.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/0b66abcb
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/0b66abcb
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/0b66abcb
Branch: refs/heads/trunk
Commit: 0b66abcbfbf22f07ac65c4d8cc9b02cd7f75e122
Parents: afc0220
Author: Hiram Chirino <hi...@hiramchirino.com>
Authored: Wed Oct 2 11:42:58 2013 -0400
Committer: Hiram Chirino <hi...@hiramchirino.com>
Committed: Wed Oct 2 12:15:36 2013 -0400
----------------------------------------------------------------------
.../leveldb/replicated/ElectingLevelDBStore.scala | 11 +++++++++++
.../activemq/leveldb/replicated/MasterElector.scala | 1 +
2 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/0b66abcb/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
index 4595a1b..decc506 100644
--- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
+++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/ElectingLevelDBStore.scala
@@ -240,6 +240,17 @@ class ElectingLevelDBStore extends ProxyLevelDBStore {
stopped_latch.countDown()
func
})
+ master.blocking_executor.execute(^{
+ val broker = brokerService
+ if( broker!=null ) {
+ try {
+ broker.requestRestart();
+ broker.stop();
+ } catch {
+ case e:Exception=> warn("Failure occurred while restarting the broker", e);
+ }
+ }
+ })
}
def objectName = {
http://git-wip-us.apache.org/repos/asf/activemq/blob/0b66abcb/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala
----------------------------------------------------------------------
diff --git a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala
index 84f93d0..c1c4c0c 100644
--- a/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala
+++ b/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/replicated/MasterElector.scala
@@ -160,6 +160,7 @@ class MasterElector(store: ElectingLevelDBStore) extends ClusteredSingleton[Leve
updating_store = true
store.stop_master {
elector.synchronized {
+ updating_store = false
info("Master stopped")
address = null
changed