mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 57911: Added UNKNOWN DiskInfo.Source type.
Date Tue, 28 Mar 2017 18:06:21 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57911/
-----------------------------------------------------------

(Updated March 28, 2017, 8:06 p.m.)


Review request for mesos and Jie Yu.


Changes
-------

Replaced one more instance of `if` with `switch`.


Summary (updated)
-----------------

Added UNKNOWN DiskInfo.Source type.


Repository: mesos


Description
-------

We introduce an explicit UNKNOWN enum kind to allow explicit handling
of unknown enum values (e.g., when the sending and receiving end use
different versions of a message using the enum).

This commit also migrates pattern matching of values of this enum from
if statements to switch statements so that compiler diagnostics can be
used to identify unhandled cases when other types are added in the
future.


Diffs (updated)
-----

  include/mesos/mesos.proto 9a66967ab459f75f21faf21be644f39b3fad670b 
  include/mesos/v1/mesos.proto 115f1b4d9e129f83a3aed62a95eb11faa12e04d1 
  src/common/resources.cpp ca1add1dbbe04fa775004010ebc847254c198bd7 
  src/slave/paths.cpp 38ad1993aa36a627ec97a7865488677495ee4c5a 
  src/slave/slave.cpp c8479d7e8eb915284f0ea8cf75f47acd679dee7e 
  src/v1/resources.cpp 6008a9d2572d04612f0da2d54834be548d366f29 


Diff: https://reviews.apache.org/r/57911/diff/2/

Changes: https://reviews.apache.org/r/57911/diff/1-2/


Testing
-------

make check (OS X, Linux)


Thanks,

Benjamin Bannier


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message