mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix get return the last modified index of the node
This commit is contained in:
parent
eca433cee5
commit
d87e0e93d3
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user