"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "wal/wal.go" between
etcd-3.4.8.tar.gz and etcd-3.4.9.tar.gz

About: etcd is a distributed reliable key-value store for the most critical data of a distributed system (written in "Go").

wal.go  (etcd-3.4.8):wal.go  (etcd-3.4.9)
skipping to change at line 571 skipping to change at line 571
decoder := newDecoder(rs...) decoder := newDecoder(rs...)
for err = decoder.decode(rec); err == nil; err = decoder.decode(rec) { for err = decoder.decode(rec); err == nil; err = decoder.decode(rec) {
switch rec.Type { switch rec.Type {
case snapshotType: case snapshotType:
var loadedSnap walpb.Snapshot var loadedSnap walpb.Snapshot
pbutil.MustUnmarshal(&loadedSnap, rec.Data) pbutil.MustUnmarshal(&loadedSnap, rec.Data)
snaps = append(snaps, loadedSnap) snaps = append(snaps, loadedSnap)
case stateType: case stateType:
state = mustUnmarshalState(rec.Data) state = mustUnmarshalState(rec.Data)
case crcType:
crc := decoder.crc.Sum32()
// current crc of decoder must match the crc of the recor
d.
// do no need to match 0 crc, since the decoder is a new
one at this case.
if crc != 0 && rec.Validate(crc) != nil {
return nil, ErrCRCMismatch
}
decoder.updateCRC(rec.Crc)
} }
} }
// We do not have to read out all the WAL entries // We do not have to read out all the WAL entries
// as the decoder is opened in read mode. // as the decoder is opened in read mode.
if err != io.EOF && err != io.ErrUnexpectedEOF { if err != io.EOF && err != io.ErrUnexpectedEOF {
return nil, err return nil, err
} }
// filter out any snaps that are newer than the committed hardstate // filter out any snaps that are newer than the committed hardstate
n := 0 n := 0
 End of changes. 1 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)