mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge c39f7712f740aee0f4af905e73699a17b5eab378 into 8dc7dd7ea0e2a83cf316a7952a9c25bed90ee4c7
This commit is contained in:
commit
32b09d0bd0
@ -1,10 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"github.com/coreos/etcd/store"
|
"github.com/coreos/etcd/store"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"fmt"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -72,9 +72,9 @@ func SetHttpHandler(w *http.ResponseWriter, req *http.Request) {
|
|||||||
|
|
||||||
if len(prevValue) != 0 {
|
if len(prevValue) != 0 {
|
||||||
command := &TestAndSetCommand{
|
command := &TestAndSetCommand{
|
||||||
Key: key,
|
Key: key,
|
||||||
Value: value,
|
Value: value,
|
||||||
PrevValue: prevValue,
|
PrevValue: prevValue,
|
||||||
ExpireTime: expireTime,
|
ExpireTime: expireTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,8 +82,8 @@ func SetHttpHandler(w *http.ResponseWriter, req *http.Request) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
command := &SetCommand{
|
command := &SetCommand{
|
||||||
Key: key,
|
Key: key,
|
||||||
Value: value,
|
Value: value,
|
||||||
ExpireTime: expireTime,
|
ExpireTime: expireTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
etcd.go
2
etcd.go
@ -555,7 +555,7 @@ func getInfo(path string) *Info {
|
|||||||
info := &Info{
|
info := &Info{
|
||||||
Hostname: hostname,
|
Hostname: hostname,
|
||||||
|
|
||||||
RaftPort: raftPort,
|
RaftPort: raftPort,
|
||||||
ClientPort: clientPort,
|
ClientPort: clientPort,
|
||||||
WebPort: webPort,
|
WebPort: webPort,
|
||||||
|
|
||||||
|
3
test.go
3
test.go
@ -74,6 +74,9 @@ func createCluster(size int, procAttr *os.ProcAttr) ([][]string, []*os.Process,
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
// we only add machine one to the cluster list
|
||||||
|
// thus we need to make sure other node start after the first one has done set up
|
||||||
|
time.Sleep(time.Millisecond * 200)
|
||||||
}
|
}
|
||||||
|
|
||||||
return argGroup, etcds, nil
|
return argGroup, etcds, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user