----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64425/ -----------------------------------------------------------
(Updated Dec. 8, 2017, 1:17 a.m.) Review request for mesos, Jie Yu and Jan Schlicht. Repository: mesos Description ------- The code in 'getResourceProviderId' was written in a way assuming that any operation containing a list resources always contained at least a single resource. This is both incorrect since such operations pass validation, and also neglects to check a crucial precondition since accessing a non-existent element in this context would lead to a check failure in protobuf and a subsequent abort. This code updates 'getResourceProviderId' to check the precondition of operations holding at least one element. Diffs (updated) ----- src/common/resources_utils.cpp 8e3d3044e7c4e2d0372ce8fb3908fdf7aab6c169 Diff: https://reviews.apache.org/r/64425/diff/2/ Changes: https://reviews.apache.org/r/64425/diff/1-2/ Testing ------- `make check` Thanks, Benjamin Bannier