You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by GitBox <gi...@apache.org> on 2021/11/26 08:50:56 UTC
[GitHub] [mesos] Lqp1 opened a new pull request #414: Fix fetcher cache reduction
Lqp1 opened a new pull request #414:
URL: https://github.com/apache/mesos/pull/414
When artifact size is smaller than expected, we want to reduce recorded
cache usage.
To do it, we actually compute the delta as an off_t (signed). If delta is
negative, we reclaim the extra space as it's not really used.
This attempt was failing because computed delta is negative,
and passed as Bytes to releaseSpace, which is unsigned. In
most cases, casting a negative value into an uint will
just give an unrelated value due to sign bit disappearing.
By passing the positive value to Bytes(), we have a safer cast.
To give more context, what we observe:
```
W1125 08:54:07.888011 10981 fetcher.cpp:643] URI download result for 'xxxxx' is smaller than expected by 253B at: /var/opt/mesos/cache/xxxxxxxx
F1125 08:54:07.888082 10981 fetcher.cpp:1272] Check failed: bytes <= tally Attempt to release more cache space than in use - requested: 18446744073709551364B, in use: 1910056052B
```
If you try
```
#include <stdio.h>
#include <stdint.h>
int main() {
off_t negative = -253;
printf("%lu\n", (uint64_t)(negative));
}
```
You'll see the same numbers match.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mesos] cf-natali commented on pull request #414: Fix fetcher cache reduction
Posted by GitBox <gi...@apache.org>.
cf-natali commented on pull request #414:
URL: https://github.com/apache/mesos/pull/414#issuecomment-980316494
Thanks!
Probably worth backporting as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [mesos] cf-natali merged pull request #414: Fix fetcher cache reduction
Posted by GitBox <gi...@apache.org>.
cf-natali merged pull request #414:
URL: https://github.com/apache/mesos/pull/414
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@mesos.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org