-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(replay): Handle compression worker errors more gracefully #6936
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
Conversation
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.
LGTM
size-limit report 📦
|
packages/replay/src/replay.ts
Outdated
@@ -323,9 +330,18 @@ export class ReplayContainer implements ReplayContainerInterface { | |||
* from calling both `flush` and `_debouncedFlush`. Otherwise, there could be | |||
* cases of mulitple flushes happening closely together. | |||
*/ | |||
public flushImmediate(): Promise<void> { | |||
public async flushImmediate(waitForCompression?: boolean): Promise<void> { |
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.
Should this default true?
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.
Hmm, I guess we could also remove this option and just always use this behavior 🤔 WDYT?
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.
That'd be even better
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 actually moved this into the worker proxy itself, which will now always wait for this when calling finish()
.
a6977c8
to
84a73d6
Compare
@billyvg added a try-catch around the worker creation! |
5d7b5f7
to
a6f11c8
Compare
partially extracted from #6924
This PR improves the event buffer to handle compression worker errors more gracefully.