You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benno Evers (JIRA)" <ji...@apache.org> on 2018/09/13 11:43:00 UTC
[jira] [Commented] (MESOS-9227) `Value::Scalar` cannot handle large
value due to double limitations.
[ https://issues.apache.org/jira/browse/MESOS-9227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613353#comment-16613353 ]
Benno Evers commented on MESOS-9227:
------------------------------------
> A possible short term mitigation might be to store disk resources in GB instead of kB which would by us a couple magnitudes at the cost of being unable to represent values less than around 1 MB.
Of course that would lead to all old tasks suddenly reserving 1.000.000 times more disk storage than they intended to. Maybe an alternative would be to introduce an optional "unit" string into the Value message, which must be a valid SI or IEC prefix.
> `Value::Scalar` cannot handle large value due to double limitations.
> --------------------------------------------------------------------
>
> Key: MESOS-9227
> URL: https://issues.apache.org/jira/browse/MESOS-9227
> Project: Mesos
> Issue Type: Bug
> Reporter: Meng Zhu
> Priority: Major
>
> While `scalar` holds a `double`, internally we convert floating point to fixed point to ensure only three decimal digits:
> https://github.com/apache/mesos/blob/851ec9c5dca672ed4efc77545c86121463695e4f/src/common/values.cpp#L48-L53
> And all internal arithmetic calculations are done using `long long`, e.g.:
> https://github.com/apache/mesos/blob/851ec9c5dca672ed4efc77545c86121463695e4f/src/common/values.cpp#L123-L128
> This has the unexpected consequence of the inability to handle large values. One impacted use case we are seeing is with exabytes of disks. This will overflow the fixed point representation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)