fix(query-on-demand): don't resolve get-page-data if query is marked as dirty #28535
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We currently have potential dead lock situation as we skip writing
page-data
(in query on demand only!) when query is marked as dirty. This means thatgetPageData
can not resolve (or rather resolve with stale data due to timeout guards) if:This PR only skips flushing page-data if query didn't run yet (
FLAG_DIRTY_NEW_PAGE
check instead of checking if query is dirty for whatever reason) and triggers another run ofdoGetPageData
that checks if query is dirty / running / pending to trigger another run if it's in fact still dirty after flushing page-data.I'm uncertain about not touching part that does emit websocket message - in this case we might not resolve
getPageData
after flushing but still emit websocket update. This should not cause weirdness withloadPage
that fetches data, but because we have single cache that is being saturated from fetch requests and websocket updates it could potentially result in weirdness but to repro it it would have to be real weird timing scenario.[ch19354]