You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our dependency task we need to account for cases when a newly reduced document may have skipped over a view which is pinned from another document (this happens when operations are batched). In this case we want to issue new dependency tasks for any of these "parent" documents (the document which contained the pinned relation). We currently do this by issuing dependency tasks for all documents where their schema contains a pinned relation to the schema of the newly reduced document. We could improve this a bit by identifying documents which actually contain the pinned relation we are looking for. This can be done by querying operation values which are of type pinned_relation or pinned_relation_list where the value matches any child_document_view_id for the current document.
It's really similar to what we do when identifying if a blob should be garbage collected (basically, it has no "parent" documents) here:
The text was updated successfully, but these errors were encountered:
sandreae
changed the title
Only issue new dependency tasks for "parent" documents which contain a pinned relation(list) to "child" document
Optimization: only issue new dependency tasks for "parent" documents which contain a pinned relation(list) to "child" document
Oct 11, 2023
It would be worth discussing whether this is actually an optimization, we would be swapping fewer tasks issued for a more complex (but maybe not that complex?) query.
In our dependency task we need to account for cases when a newly reduced document may have skipped over a view which is pinned from another document (this happens when operations are batched). In this case we want to issue new dependency tasks for any of these "parent" documents (the document which contained the pinned relation). We currently do this by issuing dependency tasks for all documents where their schema contains a pinned relation to the schema of the newly reduced document. We could improve this a bit by identifying documents which actually contain the pinned relation we are looking for. This can be done by querying operation values which are of type
pinned_relation
orpinned_relation_list
where thevalue
matches anychild_document_view_id
for the current document.It's really similar to what we do when identifying if a blob should be garbage collected (basically, it has no "parent" documents) here:
aquadoggo/aquadoggo/src/db/stores/blob.rs
Lines 324 to 370 in a24b2d8
The text was updated successfully, but these errors were encountered: