server: p.Get -> p.QuorumGet

This commit is contained in:
Yicheng Qin 2014-08-04 11:10:24 -07:00
parent cd4b35c841
commit a191df10a3
3 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ func (p *participant) v2apply(index int64, ent raft.Entry) {
e, err = p.Store.CompareAndDelete(cmd.Key, cmd.PrevValue, cmd.PrevIndex)
case "cas":
e, err = p.Store.CompareAndSwap(cmd.Key, cmd.PrevValue, cmd.PrevIndex, cmd.Value, cmd.Time)
case "get":
case "quorumGet":
e, err = p.Store.Get(cmd.Key, cmd.Recursive, cmd.Sorted)
case "sync":
p.Store.DeleteExpiredKeys(cmd.Time)

View File

@ -127,7 +127,7 @@ func (p *participant) handleQuorumGet(key string, recursive, sort bool, w http.R
if req.Method == "HEAD" {
return fmt.Errorf("not support HEAD")
}
event, err := p.Get(key, recursive, sort)
event, err := p.QuorumGet(key, recursive, sort)
if err != nil {
return err
}

View File

@ -67,8 +67,8 @@ func (p *participant) CAD(key string, prevValue string, prevIndex uint64) (*stor
return p.do(cad)
}
func (p *participant) Get(key string, recursive, sorted bool) (*store.Event, error) {
get := &cmd{Type: "get", Key: key, Recursive: recursive, Sorted: sorted}
func (p *participant) QuorumGet(key string, recursive, sorted bool) (*store.Event, error) {
get := &cmd{Type: "quorumGet", Key: key, Recursive: recursive, Sorted: sorted}
return p.do(get)
}