Skip to content
This repository was archived by the owner on Mar 4, 2024. It is now read-only.

Commit af13184

Browse files
author
Mathieu Borderé
committed
TMP - fixup after review: Add 3 ids to RAFT__REQUESTS
1 parent 8dc96dd commit af13184

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

include/raft.h

+13-12
Original file line numberDiff line numberDiff line change
@@ -919,18 +919,19 @@ RAFT_API raft_index raft_last_applied(struct raft *r);
919919

920920
/**
921921
* Common fields across client request types.
922-
* `req_id` and `client_id` are currently unused. `reserved` fields should
923-
* be replaced by new members with same size and alignment requirements
924-
* as `uint64_t`.
925-
*/
926-
#define RAFT__REQUEST \
927-
void *data; \
928-
int type; \
929-
raft_index index; \
930-
void *queue[2]; \
931-
uint64_t client_id; \
932-
uint64_t req_id; \
933-
uint64_t reserved[4] \
922+
* `req_id`, `client_id` and `unique_id` are currently unused.
923+
* `reserved` fields should be replaced by new members with the same size
924+
* and alignment requirements as `uint64_t`.
925+
*/
926+
#define RAFT__REQUEST \
927+
void *data; \
928+
int type; \
929+
raft_index index; \
930+
void *queue[2]; \
931+
uint8_t req_id[16]; \
932+
uint8_t client_id[16]; \
933+
uint8_t unique_id[16]; \
934+
uint64_t reserved[4] \
934935

935936
/**
936937
* Asynchronous request to append a new command entry to the log and apply it to

src/request.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ struct request
1111
int type;
1212
raft_index index;
1313
void *queue[2];
14-
uint64_t id;
14+
uint8_t req_id[16];
15+
uint8_t client_id[16];
16+
uint8_t unique_id[16];
1517
uint64_t reserved[4];
1618
};
1719

0 commit comments

Comments
 (0)