Skip to content

Commit 333ec0a

Browse files
authored
[ws-manager-bridge] Persist before publishing any update to maintain consistency guarantees (#20055)
1 parent 47d66a4 commit 333ec0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/ws-manager-bridge/src/bridge.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ export class WorkspaceManagerBridge implements Disposable {
394394

395395
span.setTag("after", JSON.stringify(instance));
396396

397+
await this.workspaceDB.trace(ctx).storeInstance(instance);
398+
397399
// now notify all prebuild listeners about updates - and update DB if needed
398400
await this.prebuildUpdater.updatePrebuiltWorkspace({ span }, userId, status);
399401

400-
await this.workspaceDB.trace(ctx).storeInstance(instance);
401-
402402
// cleanup
403403
// important: call this after the DB update
404404
if (!!lifecycleHandler) {

0 commit comments

Comments
 (0)