data is corrupted, but this requires manual intervention

i.e., can't be skipped

and we should only return DataCorruptionError if we can skip a msg safely
This commit is contained in:
Anton Kaliaev
2018-05-22 15:50:23 +04:00
parent 118b86b1ef
commit 68f6226bea

View File

@ -282,7 +282,7 @@ func (dec *WALDecoder) Decode() (*TimedWALMessage, error) {
length := binary.BigEndian.Uint32(b)
if length > maxMsgSizeBytes {
return nil, DataCorruptionError{fmt.Errorf("length %d exceeded maximum possible value of %d bytes", length, maxMsgSizeBytes)}
return nil, fmt.Errorf("length %d exceeded maximum possible value of %d bytes", length, maxMsgSizeBytes)
}
data := make([]byte, length)