This is an automatically generated e-mail. To reply, visit:

Review request for mesos and Michael Park.

Bugs: MESOS-4445

Repository: mesos


The previous implementation was buggy in two scenarios: (1) the label sets
contained different #s of duplicate elements (2) the "left" label set contained
duplicates and the "right" label set contained a value that didn't appear in the
"left" set.


  src/Makefile.am 19bf3a7c2e43ca04ed6e6d506e052de5537f7c2f 
  src/common/type_utils.cpp 76f48f6a1f5467db032ded8acd296d03353b4172 
  src/tests/labels_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/42688/diff/


make check


* This is a WIP.
* Rather than implement a correct equality algorithm myself, I decided to just 
use `std::unordered_multiset`. Computing equality correctly is a bit involved.
* This requires a hash implementation for `Label`. I supplied this in new 
function object in the `mesos` namespace, but we could also supply a 
specialization of `std::hash<Label>`. Not sure which is better.
* The same bug occurs in other equality operators for repeated fields 
(`CommandInfo.uris`, `Environment`, `DockerInfo`, etc.). I suppose we should 
probably fix these as well? Note that the bugs in the old approach are a lot 
less likely to occur when the struct has a lot of fields.


Neil Conway

Reply via email to