Skip to content

Commit 36019d7

Browse files
Sarah Hassanfacebook-github-bot
authored andcommitted
add witness snapshot name support
Reviewed By: jaher Differential Revision: D72482200 fbshipit-source-id: 7d1e03752692982fd222847c62370c30365f9424
1 parent ce62fa1 commit 36019d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wa_raft_storage.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ list_snapshots(RootDir) ->
713713
-spec decode_snapshot_name(Name :: string()) -> {true, {wa_raft_log:log_pos(), file:filename()}} | false.
714714
decode_snapshot_name(Name) ->
715715
case string:lexemes(Name, ".") of
716-
[?SNAPSHOT_PREFIX, IndexStr, TermStr] ->
716+
[?SNAPSHOT_PREFIX, IndexStr, TermStr | _] ->
717717
case {list_to_integer(IndexStr), list_to_integer(TermStr)} of
718718
{Index, Term} when Index >= 0 andalso Term >= 0 ->
719719
{true, {#raft_log_pos{index = Index, term = Term}, Name}};

0 commit comments

Comments
 (0)