> On Jan. 18, 2019, 11:03 a.m., Benjamin Bannier wrote: > > src/examples/test_csi_plugin.cpp > > Lines 930-931 (patched) > > <https://reviews.apache.org/r/69787/diff/1/?file=2120294#file2120294line949> > > > > Just accept values here? Move construction of `unique_ptr` is cheap and > > possibly elided.
Created the service and the completion queue in `CSIProxy` for proper shutdown instead so this is no longer an issue. > On Jan. 18, 2019, 11:03 a.m., Benjamin Bannier wrote: > > src/examples/test_csi_plugin.cpp > > Lines 978 (patched) > > <https://reviews.apache.org/r/69787/diff/1/?file=2120294#file2120294line997> > > > > Let's use a smart pointer to make clear that we pass ownership below, > > e.g., > > > > std::unique_ptr<Call> first(new Call); > > > > // Pass ownership below. > > ... first.release() ... > > > > (Btw, we pull `unique_ptr` into the current scope with a using decl, > > but still spell it out in full in most places). As discussed, this would lead to an undefined behavior in C++ because of the undetermined evaluation order for function arguments. Dropping this. Instead, I'll add more comments to explain the ownership transition. - Chun-Hung ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/69787/#review212136 ----------------------------------------------------------- On Jan. 23, 2019, 7:14 a.m., Chun-Hung Hsiao wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/69787/ > ----------------------------------------------------------- > > (Updated Jan. 23, 2019, 7:14 a.m.) > > > Review request for mesos, Benjamin Bannier, Jie Yu, and Jan Schlicht. > > > Bugs: MESOS-9517 > https://issues.apache.org/jira/browse/MESOS-9517 > > > Repository: mesos > > > Description > ------- > > If the `--proxy` flag is set, the test CSI plugin would forward all gRPC > requests to the specified gRPC server URI, and return the response to > the caller. This can be used to forward all CSI calls to a mock CSI > plugin object in the test process. > > > Diffs > ----- > > src/examples/test_csi_plugin.cpp af183037b280bab65578a4c447196a9ccf261e32 > > > Diff: https://reviews.apache.org/r/69787/diff/2/ > > > Testing > ------- > > Manually tweaked the plugin to forward requests to itself and all tests pass. > > > Thanks, > > Chun-Hung Hsiao > >
