-
-
Notifications
You must be signed in to change notification settings - Fork 595
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
ElementR| Retry query backup until it works during migration to avoid spurious correption error popup #4113
ElementR| Retry query backup until it works during migration to avoid spurious correption error popup #4113
Conversation
7ee22c4
to
99921dd
Compare
backupCallDone = true; | ||
} catch (e) { | ||
// Retry until successful, use simple constant delay | ||
await sleep(2000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured out it was better to wait a bit, not sure we need exponential backoff though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - some questions
const backupInfo = await requestKeyBackupVersion(http); | ||
let backupCallDone = false; | ||
let backupInfo: KeyBackupInfo | null = null; | ||
while (!backupCallDone) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we are offline or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. should we give up eventually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed with @richvdh, we might as well block the application until it works.
If we want to give up we would need to catch such errors in LifeCycle#handleLoadSessionFailure
and is probably part of a bigger task for proper support of offline mode on web
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you do this as part of this change, or separately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not planned for now, needs design and some refactoring
Fixes element-hq/element-web#27196
Checklist
public
/exported
symbols have accurate TSDoc documentation.