From 1f9d2050434f7ad25e06f44c1842dd365d6ec539 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Fri, 4 Dec 2015 15:02:09 -0800 Subject: [PATCH] Ketch: Intercept push and route it through Ketch Capture commands and pass to the in-process KetchLeader, allowing it to replicate to followers. Change-Id: I25dfeb2a93821af65354337f391480a72bae2210 --- .../jgit/internal/ketch/KetchText.properties | 5 + .../jgit/internal/ketch/KetchLeader.java | 2 +- .../jgit/internal/ketch/KetchPreReceive.java | 155 ++++++++++++++++++ .../jgit/internal/ketch/KetchText.java | 5 + 4 files changed, 166 insertions(+), 1 deletion(-) create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchPreReceive.java 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 4984dda74d..3817fb93cc 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,7 +1,12 @@ +accepted=accepted. cannotFetchFromLocalReplica=cannot fetch from LocalReplica +failed=failed! leaderFailedToStore=leader failed to store localReplicaRequired=LocalReplica instance is required mismatchedTxnNamespace=mismatched txnNamespace; expected {0} found {1} outsideTxnNamespace=ref {0} is outside of txnNamespace {1} +proposingUpdates=Proposing updates queuedProposalFailedToApply=queued proposal failed to apply +starting=starting! unsupportedVoterCount=unsupported voter count {0}, expected one of {1} +waitingForQueue=Waiting for queue diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchLeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchLeader.java index 851d433c4e..3bcd6bcb24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchLeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/KetchLeader.java @@ -86,7 +86,7 @@ import org.slf4j.LoggerFactory; * leader is discarded. *

* In Ketch all push requests are issued through the leader. The steps are as - * follows: + * follows (see {@link KetchPreReceive} for an example): *