Skip to content

Commit

Permalink
bump goose_std
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 16, 2021
1 parent 730d63c commit 1289fda
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.15

require (
github.com/go-redis/redis/v8 v8.8.0
github.com/goose-lang/std v0.0.0-20210616110910-cbda19ba647f
github.com/goose-lang/std v0.0.0-20210616151536-8980ecb5cb34
github.com/mit-pdos/lockservice v0.0.0-20210503234304-8c6a5346c04f
github.com/tchajed/goose v0.3.1
github.com/tchajed/marshal v0.2.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/goose-lang/std v0.0.0-20210616110910-cbda19ba647f h1:uGwD2A7nU/t7wXNg0JhKn3uNtMeRXEgfbsf52EGfnHM=
github.com/goose-lang/std v0.0.0-20210616110910-cbda19ba647f/go.mod h1:D4Gu/HWbsKPs/LleUUgK1fYm2h4SmiTZ+jMvb1zse98=
github.com/goose-lang/std v0.0.0-20210616151536-8980ecb5cb34 h1:3dEwFUpaXe985ba633E7eqH5S75KAU57jB682GZ/Bl0=
github.com/goose-lang/std v0.0.0-20210616151536-8980ecb5cb34/go.mod h1:D4Gu/HWbsKPs/LleUUgK1fYm2h4SmiTZ+jMvb1zse98=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
Expand Down
8 changes: 4 additions & 4 deletions memkv/1_memkv_shard_clerk.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (ck *MemKVShardClerk) Put(key uint64, value []byte) ErrorType {
args.Key = key
args.Value = value
// Overflowing a 64bit counter will take a while, assume it dos not happen
ck.seq = goose_std.SumAssumeNoOverflow(ck.seq, 1)
ck.seq = std.SumAssumeNoOverflow(ck.seq, 1)

rawRep := new([]byte)
// TODO: on ErrDisconnect, re-create RPCClient
Expand All @@ -47,7 +47,7 @@ func (ck *MemKVShardClerk) Get(key uint64, value *[]byte) ErrorType {
args.Seq = ck.seq
args.Key = key
// Overflowing a 64bit counter will take a while, assume it dos not happen
ck.seq = goose_std.SumAssumeNoOverflow(ck.seq, 1)
ck.seq = std.SumAssumeNoOverflow(ck.seq, 1)

rawRep := new([]byte)
// TODO: on ErrDisconnect, re-create RPCClient
Expand All @@ -66,7 +66,7 @@ func (ck *MemKVShardClerk) ConditionalPut(key uint64, expectedValue []byte, newV
args.ExpectedValue = expectedValue
args.NewValue = newValue
// Overflowing a 64bit counter will take a while, assume it dos not happen
ck.seq = goose_std.SumAssumeNoOverflow(ck.seq, 1)
ck.seq = std.SumAssumeNoOverflow(ck.seq, 1)

rawRep := new([]byte)
// TODO: on ErrDisconnect, re-create RPCClient
Expand All @@ -85,7 +85,7 @@ func (ck *MemKVShardClerk) InstallShard(sid uint64, kvs map[uint64][]byte) {
args.Sid = sid
args.Kvs = kvs
// Overflowing a 64bit counter will take a while, assume it dos not happen
ck.seq = goose_std.SumAssumeNoOverflow(ck.seq, 1)
ck.seq = std.SumAssumeNoOverflow(ck.seq, 1)

rawRep := new([]byte)
// TODO: on ErrDisconnect, re-create RPCClient
Expand Down
2 changes: 1 addition & 1 deletion memkv/2_memkv_shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (s *MemKVShardServer) conditional_put_inner(args *ConditionalPutRequest, re

if s.shardMap[sid] == true {
m := s.kvss[sid]
equal := goose_std.BytesEqual(args.ExpectedValue, m[args.Key])
equal := std.BytesEqual(args.ExpectedValue, m[args.Key])
if equal {
m[args.Key] = args.NewValue // give ownership of the slice to the server
}
Expand Down

0 comments on commit 1289fda

Please sign in to comment.