From d87e0e93d3b14b9e606fbac81448c8981703b4d4 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sat, 9 Nov 2013 19:05:38 -0800 Subject: [PATCH] fix get return the last modified index of the node --- store/node.go | 1 - store/store.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/store/node.go b/store/node.go index a0916b81a..7ed78303c 100644 --- a/store/node.go +++ b/store/node.go @@ -19,7 +19,6 @@ type Node struct { CreateIndex uint64 CreateTerm uint64 ModifiedIndex uint64 - ModifiedTerm uint64 Parent *Node `json:"-"` // should not encode this field! avoid circular dependency. diff --git a/store/store.go b/store/store.go index f9ebab7ad..04bacb711 100644 --- a/store/store.go +++ b/store/store.go @@ -91,7 +91,7 @@ func (s *store) Get(nodePath string, recursive, sorted bool) (*Event, error) { return nil, err } - e := newEvent(Get, nodePath, s.CurrentIndex) + e := newEvent(Get, nodePath, n.ModifiedIndex) if n.IsDir() { // node is a directory e.Dir = true