Skip to content

Conversation

@metascroy
Copy link
Contributor

@metascroy metascroy commented Oct 15, 2025

This PR introduces changes to the database and key-value store to retry if there are certain kinds of failures.

I've confirmed it can recover and re-create the DB if the DB is deleted during predictions.

The "std::cout" statements will be removed before landing.

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 15, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15170

Note: Links to docs will display an error until the docs builds have been completed.

❌ 4 New Failures, 2 Cancelled Jobs

As of commit ac16839 with merge base 3ccb6ab (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 15, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-codesync
Copy link

meta-codesync bot commented Oct 15, 2025

@metascroy has imported this pull request. If you are a Meta employee, you can view this in D84748624.

@metascroy
Copy link
Contributor Author

@cymbalrush can you have a look?

@cymbalrush
Copy link
Contributor

cymbalrush commented Oct 17, 2025

@metascroy do we know for sure if the database file is being deleted?
All reads and writes to the database happen on the sync queue (ETCoreMLAssetManager.mm), so access should be fully serialized. An SQLite transaction shouldn’t fail under serialized access.

If the database file is being deleted, that’s concerning — the OS will not automatically remove files from the Application Support directory. If the application itself is deleting it, can we exclude this file from that process?

Also, could we log the SQLite error code to confirm what’s actually failing? is it failing when the app is backgrounded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants