The return value is used to indicate whether the pending state should be
committed. There is no concept of "handled message" here (unlike
preprocess_query).
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
8caa1fd5abe0fd16e579e10a1ad45a4147994862)
} catch (const bad_cmd_get& e) {
bufferlist bl;
mon.reply_command(op, -EINVAL, e.what(), bl, get_last_committed());
- return true;
+ return false; /* nothing to propose! */
}
default:
mon.no_reply(op);
derr << "Unhandled message type " << m->get_type() << dendl;
- return true;
+ return false; /* nothing to propose! */
}
}
* @invariant This function is only called on a Leader.
*
* @param m An update message
- * @returns 'true' if the update message was handled (e.g., a command that
- * went through); 'false' otherwise.
+ * @returns 'true' if the pending state should be proposed; 'false' otherwise.
*/
virtual bool prepare_update(MonOpRequestRef op) = 0;
/**