Commit 519d47ad authored by Yossi Gottlieb's avatar Yossi Gottlieb
Browse files

Add a per-entry custom user data field.

This is useful to allow leaders to pass context between
raft_recv_entry() and a subsequent execution of the entry (after it was
committed) as an applylog callback.

This allows an optimized use pattern when entries received locally on
the leader can be used without going through an unnecessary
deserialization.
parent b4430b25
......@@ -89,6 +89,9 @@ typedef struct
/** type of entry */
int type;
/** private local data */
void *user_data;
raft_entry_data_t data;
} raft_entry_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment