Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX : Handle checkpoint error and proceed with remaining ops deletion batch #20576

Merged

Conversation

arafat-java
Copy link
Contributor

@arafat-java arafat-java commented Apr 10, 2024

Description

Presently when using the deleteSummarizedOps.ts when the aggregated data regarding all the unique documentIds is passed, the process iterates through each of those and then adds soft delete markers to deltas (where applicable) and does hard delete of deltas (where applicable). And this is done in a sequential manner for each of the documents which are passed in.
Now the issue is whenever there is an error occurring for any of the documents, all the documents there after are not handled and the loop breaks in between
Ideally the error should be logged for the document for which the failure happens and all the subsequent documents deletion should take place
This commit intends to handle the checkpoint fetch error for specific documents gracefully, log the details of that document and proceed with processing rest of the batch

@github-actions github-actions bot added area: server Server related issues (routerlicious) base: main PRs targeted against main branch labels Apr 10, 2024
@arafat-java
Copy link
Contributor Author

arafat-java commented Apr 10, 2024

@tylerbutler @anthony-murphy
I see you guys have some commits on deleteSummarizedOps.ts
My PR is stuck with Validate CODEOWNERS Expected — Waiting for status to be reported
Any idea how to proceed on this

Copy link
Contributor

@arafat-java the command you issued was incorrect. Please try again.

Examples are:

@ agree

and

@ agree company="your company"

@arafat-java arafat-java force-pushed the handle-checkpoint-fetch-issue branch from 0bf4099 to f002c59 Compare April 10, 2024 13:09
@arafat-java
Copy link
Contributor Author

This PR fixes #20629

@arafat-java arafat-java changed the title Handle checkpoint error and proceed with remaining ops deletion batch FIX : Handle checkpoint error and proceed with remaining ops deletion batch Apr 12, 2024
@@ -45,6 +45,14 @@ export async function deleteSummarizedOps(
doc.documentId,
);

if (realDoc === null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should work for this. But maybe we can do something even safer like:

const lastSummarySequenceNumber = JSON.parse(realDoc?.scribe ?? "{}")?.lastSummarySequenceNumber
if (lastSummarySequenceNumber === undefined) }
          Lumberjack.error(
					`Unable to delete ops. Reason: ....`,
					lumberjackProperties,
				);
				continue;
}

@arafat-java
Copy link
Contributor Author

@nmsimons , @CraigMacomber , @tylerbutler
This PR is approved but I am not authorized to merge this
Can someone please merge

@zhangxin511 zhangxin511 merged commit c7d68e6 into microsoft:main Apr 23, 2024
32 checks passed
arafat-java added a commit to arafat-java/FluidFramework that referenced this pull request Apr 25, 2024
… batch (microsoft#20576)

## Description

Presently when using the deleteSummarizedOps.ts when the aggregated data
regarding all the unique documentIds is passed, the process iterates
through each of those and then adds soft delete markers to deltas (where
applicable) and does hard delete of deltas (where applicable). And this
is done in a sequential manner for each of the documents which are
passed in.
Now the issue is whenever there is an error occurring for any of the
documents, all the documents there after are not handled and the loop
breaks in between
Ideally the error should be logged for the document for which the
failure happens and all the subsequent documents deletion should take
place
This commit intends to handle the checkpoint fetch error for specific
documents gracefully, log the details of that document and proceed with
processing rest of the batch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: server Server related issues (routerlicious) base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants