From b8c508e54d64628660aa0d907b37a9648923c1f5 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 13 May 2011 09:16:58 -0700 Subject: DHT: Add sequence RefData RefData now uses a sequence number as part of the field, ensuring that updates always increase the sequence number by one whenever a reference is modified. Attaching a sequence number to RefData will help with storing reference log entries during updates. As the sequence number should be unique within the reference name space, log entries can be keyed by the sequence number and remain unique. Making this work over reference delete-create cycles will require an additional RefTable API to return the oldest sequence number previously used in the reference log to seed the recreated reference. Change-Id: I11cfff2a96ef962e57f29925a3eef41bdbf9f9bb Signed-off-by: Shawn O. Pearce Signed-off-by: Chris Aniszczyk --- .../resources/org/eclipse/jgit/storage/dht/git_store.proto | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'org.eclipse.jgit.generated.storage.dht.proto/resources/org') diff --git a/org.eclipse.jgit.generated.storage.dht.proto/resources/org/eclipse/jgit/storage/dht/git_store.proto b/org.eclipse.jgit.generated.storage.dht.proto/resources/org/eclipse/jgit/storage/dht/git_store.proto index 78ad4f2bb9..ee9e7bddd2 100644 --- a/org.eclipse.jgit.generated.storage.dht.proto/resources/org/eclipse/jgit/storage/dht/git_store.proto +++ b/org.eclipse.jgit.generated.storage.dht.proto/resources/org/eclipse/jgit/storage/dht/git_store.proto @@ -56,6 +56,11 @@ option java_package = "org.eclipse.jgit.generated.storage.dht.proto"; // Either symref *OR* target must be populated, but never both. // message RefData { + // Incrementing counter updated each time the RefData changes. + // Should always start at 1. + // + required uint32 sequence = 5 [default = 0]; + // An ObjectId with an optional hint about where it can be found. // message Id { -- cgit v1.2.3