goraft / raft

UNMAINTAINED: A Go implementation of the Raft distributed consensus protocol.
MIT License
2.43k stars 479 forks source link

Data loss / corruption due to reading partial data from log #191

Closed ayende closed 10 years ago

ayende commented 10 years ago

See here: https://github.com/goraft/raft/blob/master/log_entry.go#L94

Read is defined so it can return only partial information. That in turn means that a log entry might actually be partially read, but that isn't being checked or accounted for.

If that happens, and it can, it means that we'll have:

benbjohnson commented 10 years ago

Thanks for catching that. I added a fix to https://github.com/goraft/raft/pull/192. Look ok?

ayende commented 10 years ago

Yes, it does

[image: RavenDB Conference] http://conference.ravendb.net

Oren Eini

CEO

Mobile: + 972-52-548-6969

Office: + 972-4-674-7811

Fax: + 972-153-4622-7811

On Tue, Feb 25, 2014 at 3:58 PM, Ben Johnson notifications@github.comwrote:

Thanks for catching that. I added a fix to #192https://github.com/goraft/raft/pull/192. Look ok?

Reply to this email directly or view it on GitHubhttps://github.com/goraft/raft/issues/191#issuecomment-36009278 .