Updated createStatusUpdate() to unset StatusUpdate.uuid instead of
setting it to an empty string.

As the deleted comment says, we were setting it to emtpy because the
'uuid' was a required field until 0.22.x. Since we are at 0.26 now,
it should be safe to just unset it.

Review: https://reviews.apache.org/r/39791


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2dd7cf8f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2dd7cf8f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2dd7cf8f

Branch: refs/heads/master
Commit: 2dd7cf8f469783090f067b818d7ddf8f39eccf9d
Parents: 39b949b
Author: Vinod Kone <[email protected]>
Authored: Fri Nov 6 09:27:04 2015 -0800
Committer: Vinod Kone <[email protected]>
Committed: Fri Nov 6 10:09:58 2015 -0800

----------------------------------------------------------------------
 src/common/protobuf_utils.cpp | 9 ---------
 src/messages/messages.proto   | 8 +++++---
 2 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2dd7cf8f/src/common/protobuf_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp
index 1e795dc..b3c2d11 100644
--- a/src/common/protobuf_utils.cpp
+++ b/src/common/protobuf_utils.cpp
@@ -95,15 +95,6 @@ StatusUpdate createStatusUpdate(
   if (uuid.isSome()) {
     update.set_uuid(uuid.get().toBytes());
     status->set_uuid(uuid.get().toBytes());
-  } else {
-    // Note that in 0.22.x, the StatusUpdate.uuid was required
-    // even though the scheduler driver ignores it for master
-    // and scheduler driver generated updates. So we continue
-    // to "set" it here so that updates coming from a 0.23.x
-    // master can be parsed by a 0.22.x scheduler driver.
-    //
-    // TODO(bmahler): In 0.24.x, leave the uuid unset.
-    update.set_uuid("");
   }
 
   if (reason.isSome()) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/2dd7cf8f/src/messages/messages.proto
----------------------------------------------------------------------
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index 9a1564f..5714087 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -82,12 +82,14 @@ message StatusUpdate {
   required FrameworkID framework_id = 1;
   optional ExecutorID executor_id = 2;
   optional SlaveID slave_id = 3;
+
+  // Since 0.23.0 we set 'status.uuid' in the executor
+  // driver for all retryable status updates.
   required TaskStatus status = 4;
+
   required double timestamp = 5;
 
-  // This is being deprecated in favor of TaskStatus.uuid. In 0.23.0,
-  // we set the TaskStatus 'uuid' in the executor driver for all
-  // retryable status updates.
+  // Since 0.26.0 this is deprecated in favor of 'status.uuid'.
   optional bytes uuid = 6;
 
   // This corresponds to the latest state of the task according to the

Reply via email to