Mas i370 deletepending (#378)
* All confirmed deletions to complete when manifest is not lockable Previously if there was ongoing work (i.e. the clerk had control over the manifest), the penciller could not confirm deletions. Now it may confirm, and defer the required manifest update to a later date (prompted by another delete confirmation request). * Refactor to update manifest even without on return of manifest Rather than waiting on next delete confirmation request * Update src/leveled_pmanifest.erl Co-authored-by: Thomas Arts <thomas.arts@quviq.com> * Missing commit Co-authored-by: Thomas Arts <thomas.arts@quviq.com>
This commit is contained in:
parent
234e0066e8
commit
28d3701f6e
1 changed files with 3 additions and 4 deletions
|
@ -1002,7 +1002,7 @@ handle_cast({manifest_change, Manifest}, State) ->
|
||||||
UpdManifest1 =
|
UpdManifest1 =
|
||||||
leveled_pmanifest:clear_pending(
|
leveled_pmanifest:clear_pending(
|
||||||
UpdManifest0,
|
UpdManifest0,
|
||||||
State#state.pending_removals,
|
lists:usort(State#state.pending_removals),
|
||||||
State#state.maybe_release),
|
State#state.maybe_release),
|
||||||
{noreply,
|
{noreply,
|
||||||
State#state{
|
State#state{
|
||||||
|
@ -1038,11 +1038,10 @@ handle_cast({confirm_delete, PDFN, FilePid}, State=#state{is_snapshot=Snap})
|
||||||
ok = leveled_sst:sst_deleteconfirmed(FilePid),
|
ok = leveled_sst:sst_deleteconfirmed(FilePid),
|
||||||
case State#state.work_ongoing of
|
case State#state.work_ongoing of
|
||||||
true ->
|
true ->
|
||||||
UpdRemovals =
|
|
||||||
lists:usort([PDFN|State#state.pending_removals]),
|
|
||||||
{noreply,
|
{noreply,
|
||||||
State#state{
|
State#state{
|
||||||
pending_removals = UpdRemovals}};
|
pending_removals =
|
||||||
|
[PDFN|State#state.pending_removals]}};
|
||||||
false ->
|
false ->
|
||||||
UpdManifest =
|
UpdManifest =
|
||||||
leveled_pmanifest:clear_pending(
|
leveled_pmanifest:clear_pending(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue