Oops, bugfixes

This commit is contained in:
Scott Lystig Fritchie 2015-08-26 17:51:43 +09:00
parent 568e165f4f
commit 9222881689

View file

@ -303,7 +303,7 @@ do_proj_write3(ProjType, #projection_v1{epoch_number=Epoch,
%% values match, and if we trust the value on disk (TODO paranoid %% values match, and if we trust the value on disk (TODO paranoid
%% check that, also), then the only difference must be the dbg2 %% check that, also), then the only difference must be the dbg2
%% list, which is ok. %% list, which is ok.
if CurCSum == CSum -> if CurEpoch == Epoch, CurCSum == CSum ->
do_proj_write4(ProjType, Proj, Path, Epoch, S); do_proj_write4(ProjType, Proj, Path, Epoch, S);
true -> true ->
{{error, written}, S} {{error, written}, S}
@ -340,14 +340,17 @@ do_proj_write4(ProjType, Proj, Path, Epoch, #state{consistency_mode=CMode}=S) ->
end, end,
S#state{max_public_epochid=EpochId}; S#state{max_public_epochid=EpochId};
ProjType == private, ProjType == private,
CMode == ap_mode,
Epoch > element(1, S#state.max_private_epochid) -> Epoch > element(1, S#state.max_private_epochid) ->
if CMode == ap_mode ->
update_wedge_state( update_wedge_state(
S#state.wedge_notify_pid, false, S#state.wedge_notify_pid, false,
EffectiveEpochId), EffectiveEpochId);
S#state{max_private_epochid=EpochId}; true ->
%% If ProjType == private and CMode == cp_mode, then %% If ProjType == private and CMode == cp_mode, then
%% the unwedge action is not performed here! %% the unwedge action is not performed here!
ok
end,
S#state{max_private_epochid=EpochId};
true -> true ->
S S
end, end,