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




src/slave/volume_gid_manager/volume_gid_manager.cpp
Lines 212-237 (patched)
<https://reviews.apache.org/r/69675/#comment298966>

    could we tweak a little bit?
    
    ```
        for (auto it = volumeGids.begin(); it != volumeGids.end(); it++) {
          const string& volumePath = it->first;
          gid_t gid = it->second;
    
          if (strings::startsWith(volumePath, path)) {
            if (volumePath != path) {
              // This is the case of the PARENT type SANDBOX_PATH volume.
              sandboxPathVolumes.push_back(volumePath);
            }
    
            LOG(INFO) << "Deallocated gid " << gid << " for the volume path '"
                      << volumePath << "'";
    
            // Only return the gid to the free range if it is in the total
            // range. The gid may not be in the total range in the case that
            // Mesos agent is restarted with a different total range and we
            // deallocate gid for a previous volume path from the old range.
            if (totalGids.contains(gid)) {
              freeGids += gid;
            }
    
            volumeGids.erase(it);
          }
        }
    ```



src/slave/volume_gid_manager/volume_gid_manager.cpp
Lines 229 (patched)
<https://reviews.apache.org/r/69675/#comment298968>

    probably we don't need this check?



src/slave/volume_gid_manager/volume_gid_manager.cpp
Lines 283 (patched)
<https://reviews.apache.org/r/69675/#comment298967>

    do we really need `totalGids`?


- Gilbert Song


On Jan. 6, 2019, 4:25 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69675/
> -----------------------------------------------------------
> 
> (Updated Jan. 6, 2019, 4:25 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik, Gilbert Song, Greg Mann, Ilya 
> Pronin, and Jie Yu.
> 
> 
> Bugs: MESOS-8810
>     https://issues.apache.org/jira/browse/MESOS-8810
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This manager is used to allocate/deallocate gids for shared persistent
> volumes and PARENT type SANDBOX_PATH volumes.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt bde070445b644e15d46c390d1c983caabaa1fec8 
>   src/Makefile.am 7a4904a3d67479267087fd2313a263d8218843fa 
>   src/slave/volume_gid_manager/volume_gid_manager.hpp PRE-CREATION 
>   src/slave/volume_gid_manager/volume_gid_manager.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/69675/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>

Reply via email to