Repository navigation
Conversation
|
This looks fine, but should we be pushing it farther up the stack as well? (Or just using const refs? I don't remember how they're used.) |
|
@gregsfortytwo |
Signed-off-by: Michal Jarzabek <[email protected]>
7e3c658 to
49a594d
Compare
|
I have also added std::move in PaxosService.h |
|
Okay, I don't like this new version. Constructors on PaxosService and MDSMonitor are rarely invoked and any confusion about ownership isn't worth it if somebody ends up passing re-used strings or something. I think just using const string& will capture the important bits. |
|
@gregsfortytwo |
|
The MDSMonitor constructor is only called once per mon process and the parent PaxosService is called maybe 5 times per process, all at startup. There's very little point in optimizing them like this if there is any chance of that causing bugs in the future. It's not likely to cause trouble, but stealing string values can do so in some cases if they're reused (which we do with other initialization strings from time to time). So let's skip this one. |
Signed-off-by: Michal Jarzabek [email protected]