-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30626/
-----------------------------------------------------------

(Updated Feb. 8, 2015, 8:43 a.m.)


Review request for mesos, Adam B, Benjamin Hindman, Till Toenshoff, and Timothy 
Chen.


Changes
-------

Adjusted HTTP server request counts to prefetching of download sizes.


Bugs: MESOS-2072
    https://issues.apache.org/jira/browse/MESOS-2072


Repository: mesos


Description
-------

Fetcher cache eviction happens when the cache does not have enough space to 
accomodate upcoming downloads to the cache. Necessary provisions included here:
- mesos-fetcher does not run until eviction was successful
- Cache space is reserved while (async) waiting for eviction to succeed. If it 
fails, the reservation gets undone.
- Reservations can be partly from available space, partly from evictions. All 
math included :-)
- To find out how much space is needed, downloading has a prelude in which we 
query the download size from the URI. This works for all URI types that 
mesos-fetcher currently supports, including http and hdfs.
- Size-determination requests are not synchronized and can be repeated. That is 
deemed OK, since they are small. But downloading still is synchronized (by the 
fetcher actor) since MESOS-2057. This avoids repeated downloads and potential 
bandwidth choking.
- There is cleanup code for all kinds of error situations. Lists of URIs or 
cache files are reached down as shared pointers to continuations, which can add 
to these lists. At the very end of the fetch attempt, each list is processed 
for undoing things like space reservations and eviction disabling.
- Eviction gets disabled for URIs that are currently in use, i.e. the related 
cache files are. We use reference counting for this, since there may be 
concurrent fetch attempts using the same cache files.

This patch depends on a series of smaller preparatory ones.


Diffs (updated)
-----

  src/slave/containerizer/fetcher.hpp bfd98dbe16e2bd5df3e2c8e9b10e303654f33446 
  src/slave/containerizer/fetcher.cpp 6e6bce08d76bb8a5813c905e3ffeff9b2411fd6d 
  src/tests/fetcher_cache_tests.cpp PRE-CREATION 

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


Testing (updated)
-------

make check.


Thanks,

Bernd Mathiske

Reply via email to