Skip to content

Commit 8e52275

Browse files
committed
Use a priority queue to determine order of MV builds in edda
When streaming patches out to the front end, it would be helpful for the front end's reactivity to be able to send lists early so it can display skeletons for individual items it hasn't gotten the patch information for yet. Right now, there are two "priorities": * Lists * Details (everything else) By default an MV will use the "Details" priority. If the `build_priority` annotation is provided for the MV struct definition, then it will use whatever is specified in the annotation. This also re-structures how MV build tasks are spawned so that we can get everything queued before letting the priority queue handle things from there, to ensure the higher-priority items are always built first. Rather than having to explicitly check if the Change's `entity_kind` is the same as the MV's `trigger_entity`, this check has been abstracted away into the `MaterializedViewInventoryItem` and is checked during the initial queue population. This means that whenever we go to spawn an MV build task, we already know that the change is relevant for that specific MV kind.
1 parent 3cc798e commit 8e52275

File tree

14 files changed

+273
-318
lines changed

14 files changed

+273
-318
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)