mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MESOS-4275) Duration uses fixed-width types inconsistently
Date Mon, 04 Jan 2016 19:34:39 GMT

     [ https://issues.apache.org/jira/browse/MESOS-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Bannier updated MESOS-4275:
------------------------------------
    Sprint: Mesosphere Sprint 26

> Duration uses fixed-width types inconsistently
> ----------------------------------------------
>
>                 Key: MESOS-4275
>                 URL: https://issues.apache.org/jira/browse/MESOS-4275
>             Project: Mesos
>          Issue Type: Bug
>          Components: stout
>            Reporter: Benjamin Bannier
>            Assignee: Benjamin Bannier
>
> The implementation of the {{Duration}} class correctly uses fixed-width types (here {{int64_t}})
for portability internally, but uses {{long}} types in a few places (in particular {{LLONG_MIN}}
and {{LLONG_MAX}}). This is inconsistent on 64-bit platforms, and probably incorrect on 32-bit
as there {{long}} is 32 bit wide.
> Additionally, the longer {{Duration}} types ({{Minutes}}, {{Hours}}, {{Days}}, and {{Weeks}})
construct from {{int32_t}}, while shorter ones take {{int64_t}}. Probably as a left-over this
is matched with a redundant {{Duration}} constructor taking an {{int32_t}} value where the
other one taking an {{int64_t}} value would be sufficient. It should be safe to just construct
from {{int64_t}} in all places.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message