> On June 23, 2016, 5:35 p.m., Jiang Yan Xu wrote: > > src/slave/state.hpp, line 271 > > <https://reviews.apache.org/r/48313/diff/5/?file=1425822#file1425822line271> > > > > It looks a bit odd that we are explicitly initiating `target` but not > > `resources`. > > > > Note that it's not necessary to initiate either but it is necessary to > > initiate errors here.
Ok. Removed explicit initialization of `target` to `None()`. > On June 23, 2016, 5:35 p.m., Jiang Yan Xu wrote: > > src/slave/state.hpp, lines 277-280 > > <https://reviews.apache.org/r/48313/diff/5/?file=1425822#file1425822line277> > > > > s/parseResource/recoverResources/ and this could just be a non-member > > helper hidden in the cpp file (which I suspect can be replaced in a > > followup). Renamed `parseResource()` to `recoverResources()`. > On June 23, 2016, 5:35 p.m., Jiang Yan Xu wrote: > > src/slave/slave.cpp, lines 2579-2580 > > <https://reviews.apache.org/r/48313/diff/5/?file=1425821#file1425821line2579> > > > > This is more of a comment on the later review: > > > > Here we don't know if framework intends to create a new persistent > > volume, i.e., if both the new checkpointed resources and the old have the > > same persistent volume and the disk has the directory and it's not empty -> > > its OK! > > > > We only want to make sure the directory is empty when the new > > checkpointed resources' volume is not in the old checkpointed resources. > > > > Plus this condition only applies to MOUNT, we can easily check/CHECK > > the resources to find out. Added an appropriate comment in https://reviews.apache.org/r/48315. - Anindya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48313/#review139100 ----------------------------------------------------------- On July 1, 2016, 9:39 p.m., Anindya Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48313/ > ----------------------------------------------------------- > > (Updated July 1, 2016, 9:39 p.m.) > > > Review request for mesos, Neil Conway and Jiang Yan Xu. > > > Bugs: MESOS-5448 > https://issues.apache.org/jira/browse/MESOS-5448 > > > Repository: mesos > > > Description > ------- > > When the agent receives CheckpointedResourcesMessage, we store the > target checkpoint on disk. On successful create and destroy of > persistent volumes as a part of handling this messages, we commit > the checkpoint on the disk, and clear the target checkpoint. > > However, incase of any failure we do not commit the checkpoint to > disk, and exit the agent. When the agent restarts and there is a > target checkpoint present on disk which differs from the committed > checkpoint, we retry to sync the target and committed checkpoint. > On success, we reregister the agent with the master, but in case it > fails, we do not commit the checkpoint and the agent exists. > > > Diffs > ----- > > src/slave/paths.hpp 339e539863c678b6ed4d4670d75c7ff4c54daa79 > src/slave/paths.cpp 03157f93b1e703006f95ef6d0a30afae375dcdb5 > src/slave/slave.hpp 484ba758b4c87935aabd2f76a0e654a3c6d09167 > src/slave/slave.cpp da643e6e50b2f313705d2f862c961291aa5d2f22 > src/slave/state.hpp 0de2a4ee4fabaad612c4526166157b001c380bdb > src/slave/state.cpp 9cec0868b1187ed3ccac7f065e8a21c2f52178d9 > > Diff: https://reviews.apache.org/r/48313/diff/ > > > Testing > ------- > > All tests passed. > > > Thanks, > > Anindya Sinha > >