summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2016-01-12 21:55:43 -0800
committerShawn Pearce <spearce@spearce.org>2016-01-19 23:05:28 -0800
commitda5ef91ad0c7021142f184bf24abafc0895e3446 (patch)
tree14e8fc3ebb8993108f27f718c51ae6ba553bbd10 /org.eclipse.jgit
parent1f9d2050434f7ad25e06f44c1842dd365d6ec539 (diff)
downloadjgit-da5ef91ad0c7021142f184bf24abafc0895e3446.tar.gz
jgit-da5ef91ad0c7021142f184bf24abafc0895e3446.zip
daemon: Add --ketch=LEADER flag
Experimental flag to turn on the KetchLeader within this daemon JVM. This is a manually elected leader process, set from the command line. Remote followers for each repository are configured per-repository using remote sections with ketch-type = FULL. For example: Manually elected leader's $GIT_DIR/config: [ketch] name = A [remote "A"] ketch-type = FULL [remote "B"] url = git://127.0.0.1:9421/sample.git ketch-type = FULL [remote "C"] url = git://127.0.0.1:9422/sample.git ketch-type = FULL Replica B and C daemons: git daemon \ --export-all \ --enable=receive-pack \ --listen=127.0.0.1 --port=9421 \ --base-path=$HOME/ketch_test/follower_one \ $HOME/ketch_test/follower_one & git daemon \ --export-all \ --enable=receive-pack \ --listen=127.0.0.1 --port=9422 \ --base-path=$HOME/ketch_test/follower_two \ $HOME/ketch_test/follower_two & Change-Id: I165f85970a77e16b5263115290d685d8a00566f5
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/resources/org/eclipse/jgit/internal/ketch/KetchText.properties1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchText.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java10
3 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/ketch/KetchText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/ketch/KetchText.properties
index 3817fb93cc..1fbb7cb3b5 100644
--- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/ketch/KetchText.properties
+++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/ketch/KetchText.properties
@@ -1,6 +1,7 @@
accepted=accepted.
cannotFetchFromLocalReplica=cannot fetch from LocalReplica
failed=failed!
+invalidFollowerUri=invalid follower URI
leaderFailedToStore=leader failed to store
localReplicaRequired=LocalReplica instance is required
mismatchedTxnNamespace=mismatched txnNamespace; expected {0} found {1}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchText.java
index da85c0112d..b6c3bc92c5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchText.java
@@ -57,6 +57,7 @@ public class KetchText extends TranslationBundle {
/***/ public String accepted;
/***/ public String cannotFetchFromLocalReplica;
/***/ public String failed;
+ /***/ public String invalidFollowerUri;
/***/ public String leaderFailedToStore;
/***/ public String localReplicaRequired;
/***/ public String mismatchedTxnNamespace;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
index d9e0b937e8..2593ba556d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
@@ -256,6 +256,16 @@ public class Daemon {
}
/**
+ * Get the factory used to construct per-request ReceivePack.
+ *
+ * @return the factory.
+ * @since 4.2
+ */
+ public ReceivePackFactory<DaemonClient> getReceivePackFactory() {
+ return receivePackFactory;
+ }
+
+ /**
* Set the factory to construct and configure per-request ReceivePack.
*
* @param factory