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

Report Changeset download progress for CheckpointManager.downloadCheckpoint #7357

Open
MindaugasButkus opened this issue Nov 13, 2024 · 0 comments
Assignees

Comments

@MindaugasButkus
Copy link
Member

Is your feature request related to a problem? Please describe.
CheckpointManager.downloadCheckpoint accepts an onProgress callback which is only used for the Checkpoint itself. It is not propagated to changeset downloading if there are any in between the requested changeset and the latest available checkpoint.

Describe the solution you'd like
I would like to be able to get progress report on every changeset being downloaded. That is, not only total and downloaded, but also the changeset identifier (id, index, or the whole Changeset metadata object). Based on that progress report I would want to either restart the download, or even better - CheckpointManager should retry downloading changesets.

Describe alternatives you've considered
An alternative would be to manually check which changesets would be downloaded with CheckpointManager.downloadCheckpoint and download them before calling it, since it should not re-download what was already downloaded. By downloading changesets manually I could pass in the onProgress callback for the changeset download part.

Additional context
iTwin/imodels-clients#275 This PR raised my interest. In the past I have seen iTwinJs hang within CheckpointManager.downloadCheckpoint. This happened very rarely, so it was pretty much impossible to debug. I now do have reason to believe that it was happening during changeset download.

This is the place where the onProgress callback is lost: https://github.com/iTwin/itwinjs-core/blob/master/core/backend/src/CheckpointManager.ts#L356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants