Skip to content

Commit 1009f77

Browse files
Merge pull request #542 from rabbitmq/md/type-os
Fix type mixups of `ra_index()` and `ra_term()`
2 parents 4fe881f + b2b1d8d commit 1009f77

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ra.hrl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
{term :: ra_term(),
136136
candidate_id :: ra_server_id(),
137137
last_log_index :: ra_index(),
138-
last_log_term :: ra_index()}).
138+
last_log_term :: ra_term()}).
139139

140140
%% Section 4.2
141141
-record(request_vote_result,
@@ -151,7 +151,7 @@
151151
token :: reference(),
152152
candidate_id :: ra_server_id(),
153153
last_log_index :: ra_index(),
154-
last_log_term :: ra_index()}).
154+
last_log_term :: ra_term()}).
155155

156156
-record(pre_vote_result,
157157
{term :: ra_term(),

test/ra_log_memory.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
-record(state, {last_index = 0 :: ra_index(),
4747
last_written = {0, 0} :: ra_idxterm(), % only here to fake the async api of the file based one
4848
entries = #{0 => {0, undefined}} ::
49-
#{ra_term() => {ra_index(), term()}},
49+
#{ra_index() => {ra_term(), term()}},
5050
meta = #{} :: ra_log_memory_meta(),
5151
snapshot :: option({ra_snapshot:meta(), term()})}).
5252

0 commit comments

Comments
 (0)