bito-code-review[bot] commented on PR #43461:
URL: https://github.com/apache/superset/pull/43461#issuecomment-5396690934
<!-- Bito Reply -->
The flagged issue is correct. The current implementation of
`waitForAsyncData` in `superset-frontend/src/middleware/asyncEvent.ts`
correctly registers the waiter synchronously to avoid the race condition where
a task completes before the baseline request resolves. The changes in the
provided diff already implement this fix by removing the `baselineReady`
promise and ensuring the waiter is registered immediately.
I have reviewed the other changes in this PR, which include a database
migration and model update to increase the `guest_key` column size to 128
characters to accommodate 70-character keys, along with a corresponding unit
test. These changes appear consistent and correct. Would you like me to fetch
all comments to check for any other pending issues?
**superset-frontend/src/middleware/asyncEvent.ts**
```
// Register the waiter synchronously, in the same tick the 202 was received —
// NOT after an await. The 202 is returned when the tasks are *scheduled*,
not
// finished, so at this point the shared poll cursor is <= now < any task's
// future terminal transition; the poll is therefore guaranteed to observe
the
// completion. Awaiting anything here (e.g. the init baseline) would open
a gap
// in which a fast task could finish and a concurrent chart's poll advance
the
// cursor past its terminal update, and the socket event (no waiter yet)
would
// be dropped — hanging the request.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]