DAOS-279 log: Avoid changing caller input entry
log_append_entry() passes caller's raft_entry_t to log_offer. If the
log_offer implementation sets the data buffer to different value,
caller's raft_entry_t gets modified as a side effect. This is
error-prone as callers are usually responsible for freeing the data
buffer with such a log_offer implementation. This patch passes the
raft_entry_t in the log to log_offer instead. Also, ety in
raft_recv_entry() is no longer required.
Signed-off-by:
Li Wei <wei.g.li@intel.com>
Please register or sign in to comment