mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [2/2] git commit: Updated uses of protobuf::read towards explicit undo where needed.
Date Mon, 14 Apr 2014 16:16:43 GMT
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 <toenshoff@me.com>
Authored: Sun Apr 13 22:17:23 2014 -0700
Committer: Benjamin Hindman <benjamin.hindman@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;


Mime
View raw message