separate Put and Append in lab 4 kvsrv
This commit is contained in:
@@ -43,7 +43,11 @@ func (kv *KVServer) Get(args *GetArgs, reply *GetReply) {
|
||||
|
||||
// unlike in lab 2, neither Put nor Append should return a value.
|
||||
// this is already reflected in the PutAppendReply struct.
|
||||
func (kv *KVServer) PutAppend(args *PutAppendArgs, reply *PutAppendReply) {
|
||||
func (kv *KVServer) Put(args *PutAppendArgs, reply *PutAppendReply) {
|
||||
// Your code here.
|
||||
}
|
||||
|
||||
func (kv *KVServer) Append(args *PutAppendArgs, reply *PutAppendReply) {
|
||||
// Your code here.
|
||||
}
|
||||
|
||||
@@ -82,7 +86,7 @@ func StartKVServer(servers []*labrpc.ClientEnd, me int, persister *raft.Persiste
|
||||
// call labgob.Register on structures you want
|
||||
// Go's RPC library to marshall/unmarshall.
|
||||
labgob.Register(Op{})
|
||||
|
||||
|
||||
kv := new(KVServer)
|
||||
kv.me = me
|
||||
kv.maxraftstate = maxraftstate
|
||||
|
||||
Reference in New Issue
Block a user