> On Dec. 10, 2018, 8:22 a.m., Benno Evers wrote: > > src/slave/http.cpp > > Lines 862 (patched) > > <https://reviews.apache.org/r/69473/diff/4/?file=2112650#file2112650line862> > > > > I wonder: This `switch` statement doesn't have a `default` case, so if > > a new executor sends a heartbeat to an old agent, wouldn't it skip past the > > `switch` into the `UNREACHABLE` and kill the agent?
When dealing with protobuf enums in general, the `0` value is special in that any un-mapped types will be parsed as `0`. So suppose a server knows about an enum like this: ``` enum Type { UNKNOWN = 0; ONE = 1; TWO = 2; } ``` While the client's enum has an additional row: ``` enum Type { UNKNOWN = 0; ONE = 1; TWO = 2; THREE = 3; } ``` When passed over the wire, the client will send a `Type = 3`. The server will parse this as `UNKNOWN`, because this is the default value of an enum. The documentation does not explicitly spell out this behavior, but it is considered best-practice for making extendable enums via protobuf: https://developers.google.com/protocol-buffers/docs/proto3#enum - Joseph ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69473/#review211142 ----------------------------------------------------------- On Dec. 7, 2018, 2:17 p.m., Joseph Wu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69473/ > ----------------------------------------------------------- > > (Updated Dec. 7, 2018, 2:17 p.m.) > > > Review request for mesos, Benno Evers, Gastón Kleiman, and Greg Mann. > > > Bugs: MESOS-7564 > https://issues.apache.org/jira/browse/MESOS-7564 > > > Repository: mesos > > > Description > ------- > > This implements two separate heartbeaters for Executor Events (agent > to executor) and Executor Calls (executor to agent). Both are set to > non-configurable intervals of 30 minutes, which should be sufficient > to keep the connections alive while not flooding logs with warnings > if the executor/agent does not have this patch. > > > Diffs > ----- > > src/common/validation.cpp 5f8f2889f79f9486f8bb731b39f706908dcd84ea > src/executor/executor.cpp d00ea32f02c1d92d64525b8b5ce5ca18ac840c1b > src/executor/v0_v1executor.cpp aebdbe705dac604da44aba484dc4d007e83b8e37 > src/launcher/default_executor.cpp b89b0363d64b8dd8936a62b57803f0eff50bfc71 > src/launcher/executor.cpp 6b1204dc5a67d4fc3e8ceae378262d53f3d28421 > src/slave/constants.hpp fdc21a35bcc0028dc0a2d7ebd06171fad2a20ba1 > src/slave/http.cpp ba389263ef7ab311682d542424eb56360841d24c > src/slave/slave.hpp edf7269d4057ec8c95bb54c855210ad00d002a50 > src/slave/slave.cpp e13b955ffd92a8872dd513c006e96bd72e298c85 > > > Diff: https://reviews.apache.org/r/69473/diff/4/ > > > Testing > ------- > > make > > > Thanks, > > Joseph Wu > >