From dc5d5c6ac8b37b0a7cab01d418bf05cfea44aa5e Mon Sep 17 00:00:00 2001 From: Jared Hulbert Date: Fri, 8 Jul 2016 11:05:41 -0700 Subject: [PATCH] raft: atomic access alignment The relevant structures are properly aligned, however, there is no comment highlighting the need to keep it aligned as is present elsewhere in the codebase. Adding note to keep alignment, in line with similar comments in the codebase. --- raft/node.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/node.go b/raft/node.go index 59d61284d..22332be6b 100644 --- a/raft/node.go +++ b/raft/node.go @@ -38,7 +38,7 @@ var ( // SoftState provides state that is useful for logging and debugging. // The state is volatile and does not need to be persisted to the WAL. type SoftState struct { - Lead uint64 + Lead uint64 // must use atomic operations to access; keep 64-bit aligned. RaftState StateType }