Commit 24816db0 authored by Nickolai Zeldovich's avatar Nickolai Zeldovich

update

parent 45d6c0d2
package kvpaxos
import "net/rpc"
import "time"
import "crypto/rand"
import "math/big"
import "fmt"
type Clerk struct {
servers []string
......@@ -46,6 +44,8 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......@@ -65,6 +65,7 @@ func (ck *Clerk) Get(key string) string {
//
func (ck *Clerk) PutExt(key string, value string, dohash bool) string {
// You will have to modify this function.
return ""
}
func (ck *Clerk) Put(key string, value string) {
......
package lockservice
import "net/rpc"
import "fmt"
//
// the lockservice Clerk lives in the client
......@@ -48,6 +49,8 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package mapreduce
import "fmt"
import "net/rpc"
const (
......@@ -67,5 +68,7 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......@@ -74,6 +74,8 @@ func call(srv string, name string, args interface{}, reply interface{}) bool {
if err == nil {
return true
}
fmt.Println(err)
return false
}
......
......@@ -2,6 +2,7 @@ package pbservice
import "viewservice"
import "net/rpc"
import "fmt"
// You'll probably need to uncomment these:
// import "time"
......@@ -53,6 +54,8 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......
......@@ -4,7 +4,7 @@ import "shardmaster"
import "net/rpc"
import "time"
import "sync"
// import "fmt"
import "fmt"
type Clerk struct {
mu sync.Mutex // one RPC at a time
......@@ -50,6 +50,8 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......
......@@ -7,6 +7,7 @@ package shardmaster
import "net/rpc"
import "time"
import "fmt"
type Clerk struct {
servers []string // shardmaster replicas
......@@ -46,6 +47,8 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......
......@@ -47,6 +47,8 @@ func call(srv string, rpcname string,
if err == nil {
return true
}
fmt.Println(err)
return false
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment