You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Xudong Ni (JIRA)" <ji...@apache.org> on 2018/08/24 23:09:00 UTC

[jira] [Created] (MESOS-9183) IntervalSet up bound is one off

Xudong Ni created MESOS-9183:
--------------------------------

             Summary: IntervalSet<uint16_t> up bound is one off
                 Key: MESOS-9183
                 URL: https://issues.apache.org/jira/browse/MESOS-9183
             Project: Mesos
          Issue Type: Bug
          Components: stout
            Reporter: Xudong Ni


the unsigned int 16 range is [0, 65535]; if we tried to set this range, the set will be "{}"

Example code:
{quote}IntervalSet<uint16_t> set;

set += (Bound<uint16_t>::closed(0), Bound<uint16_t>::closed(65535));

Results: "{}"; Expected: "[0, 65535]"
{quote}
If we decrease the up bound by 1 to 65534, it work normally.
{quote}IntervalSet<uint16_t> set;

set += (Bound<uint16_t>::closed(0), Bound<uint16_t>::closed(65534));

Results: "[0, 65535)"; Expected: "[0, 65535)"
{quote}
It appears the the up bound is one off, since the inervalSet is template, other type may have the same issue.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)