mirror of
https://github.com/talent-plan/tinykv.git
synced 2024-12-27 13:20:24 +08:00
Merge branch 'course' into lorettax
This commit is contained in:
commit
42603af3c6
@ -502,13 +502,11 @@ func TestOldMessages2AB(t *testing.T) {
|
|||||||
tt.send(pb.Message{From: 1, To: 1, MsgType: pb.MessageType_MsgPropose, Entries: []*pb.Entry{{Data: []byte("somedata")}}})
|
tt.send(pb.Message{From: 1, To: 1, MsgType: pb.MessageType_MsgPropose, Entries: []*pb.Entry{{Data: []byte("somedata")}}})
|
||||||
|
|
||||||
ilog := newLog(
|
ilog := newLog(
|
||||||
&MemoryStorage{
|
newMemoryStorageWithEnts([]pb.Entry{
|
||||||
ents: []pb.Entry{
|
|
||||||
{}, {Data: nil, Term: 1, Index: 1},
|
{}, {Data: nil, Term: 1, Index: 1},
|
||||||
{Data: nil, Term: 2, Index: 2}, {Data: nil, Term: 3, Index: 3},
|
{Data: nil, Term: 2, Index: 2}, {Data: nil, Term: 3, Index: 3},
|
||||||
{Data: []byte("somedata"), Term: 3, Index: 4},
|
{Data: []byte("somedata"), Term: 3, Index: 4},
|
||||||
},
|
}))
|
||||||
})
|
|
||||||
ilog.committed = 4
|
ilog.committed = 4
|
||||||
base := ltoa(ilog)
|
base := ltoa(ilog)
|
||||||
for i, p := range tt.peers {
|
for i, p := range tt.peers {
|
||||||
|
Loading…
Reference in New Issue
Block a user