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

Error fetching checkpoint for any document causes rest of the batch to fail in deleteSummarizedOps #20629

Closed
arafat-java opened this issue Apr 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@arafat-java
Copy link
Contributor

Describe the bug

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

To Reproduce

Steps to reproduce the behavior:

  1. Intentionally delete the content block from one of the DOCUMENTS#tenant#documentId collection item
  2. Enable the softDeletionEnabled flag
  3. Restart scriptorium
  4. See error as follows

Expected behavior

Ideally the error should be logged for the document for which the failure happens and all the subsequent documents deletion should take place

Logs

  "line": {
    "eventName": "LogMessage",
    "exception": {
      "message": "Cannot read properties of null (reading 'scribe')",
      "stack":"TypeError: Cannot read properties of null (reading 'scribe')\n	at deleteSummarizedOps (/usr/src/app/node_modules/@fluidframework/server-services-utils/dist/deleteSummarizedOps.js:27:66)\n	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
      "name": "TypeError"
    },
    "message": "Error running deleteSummarizedOps",
    "id": "d5b9ced8-5c0e-4ecf-9518-22c147ea7419",
    "type": "Log",
    "label": "winston",
    "level": "error",
    "properties": "{}",
    "timestamp": "2024-04-05T14:41:41.505Z"
  },

@arafat-java
Copy link
Contributor Author

This bug is fixed by PR #20576

@arafat-java arafat-java changed the title Handle checkpoint error and proceed with remaining ops deletion batch Error in fetching checkpoint for any document causes rest of the batch to fail in deleteSummarizedOps Apr 12, 2024
@arafat-java arafat-java changed the title Error in fetching checkpoint for any document causes rest of the batch to fail in deleteSummarizedOps Error fetching checkpoint for any document causes rest of the batch to fail in deleteSummarizedOps Apr 12, 2024
@arafat-java
Copy link
Contributor Author

Fixed by PR #20576
Commit c7d68e6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant