Skip to content

Commit

Permalink
Handle checkpoint error and proceed with remaining ops deletion batch
Browse files Browse the repository at this point in the history
  • Loading branch information
arafat-java committed Apr 10, 2024
1 parent 360deea commit f002c59
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ export async function deleteSummarizedOps(
doc.documentId,
);

if (realDoc === null) {
Lumberjack.error(
`Unable to delete ops. Reason: Failed to get latest checkpoint`,
lumberjackProperties,
);
continue;
}

const lastSummarySequenceNumber = JSON.parse(realDoc.scribe).lastSummarySequenceNumber;

// first "soft delete" operations older than the offline window, which have been summarised
Expand Down Expand Up @@ -84,7 +92,6 @@ export async function deleteSummarizedOps(
}
} catch (error) {
Lumberjack.error(`Error while trying to delete ops`, lumberjackProperties, error);
throw error;
}
}
}

0 comments on commit f002c59

Please sign in to comment.