You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/04/14 18:16:43 UTC
[2/2] git commit: Updated uses of protobuf::read towards explicit
undo where needed.
Updated uses of protobuf::read towards explicit undo where needed.
Review: https://reviews.apache.org/r/20237
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9e9bf44c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9e9bf44c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9e9bf44c
Branch: refs/heads/master
Commit: 9e9bf44c706f004ac9fda79b82afeac00b484941
Parents: 012818b
Author: Till Toenshoff <to...@me.com>
Authored: Sun Apr 13 22:17:23 2014 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sun Apr 13 22:17:23 2014 -0700
----------------------------------------------------------------------
src/slave/state.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9e9bf44c/src/slave/state.cpp
----------------------------------------------------------------------
diff --git a/src/slave/state.cpp b/src/slave/state.cpp
index 21d1fb7..a2af33c 100644
--- a/src/slave/state.cpp
+++ b/src/slave/state.cpp
@@ -578,8 +578,9 @@ Try<TaskState> TaskState::recover(
// Now, read the updates.
Result<StatusUpdateRecord> record = None();
while (true) {
- // Ignore errors due to partial protobuf read.
- record = ::protobuf::read<StatusUpdateRecord>(fd.get(), true);
+ // Ignore errors due to partial protobuf read and enable undoing
+ // failed reads by reverting to the previous seek position.
+ record = ::protobuf::read<StatusUpdateRecord>(fd.get(), true, true);
if (!record.isSome()) {
break;