ソースを参照

Make sure the raft state occupies entire L3 cache.

Jing Yang 3 年 前
コミット
17a7dfa1d2
1 ファイル変更1 行追加0 行削除
  1. 1 0
      src/raft_state.rs

+ 1 - 0
src/raft_state.rs

@@ -10,6 +10,7 @@ pub(crate) enum State {
     Leader,
 }
 
+#[repr(align(64))]
 pub(crate) struct RaftState<Command> {
     pub current_term: Term,
     pub voted_for: Option<Peer>,