-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tables without deltas don't replenish downstream tables #303
Comments
And additionally, even with a delta, only the delta is added to the downstream table. |
This might be related to #292 (which, unfortunately, seems like it will take some work to fix properly). I'll take a look... |
Ugh, there are at least 3 different errors in the rescan/invalidate logic interacting here; similar to the problems underlying #292, but at least some of the problems are distinct.
|
The rescan/invalidation logic runs into several different problems when presented with deletions to a persistent table that is downstream of other persistent tables -- see #303. This commit fixes one of those issues: when computing the invalidation scheme, we should consider what needs to be done when each table is invalidated, NOT when each table is marked for rescan. Other related issues will be addressed in subsequent commits.
See #303. This commit fixes the case where we have a deletion on a table that does not appear in the RHS of any rules. Since the table does not get a scanner, the previous coding neglected to compute an invalidation/rescan scheme for this collection. A possible fix would be to move the necessary invalidation/rescan state from the scanner to the collection itself. However, this is complicated -- a single collection might have multiple scanners with different rescan requirements, for example. For now, it seems simpler (but possibly uglier) to create a separate list of "orphan scanners" -- i.e., scanners for collections that appear in at least one rule LHS but no RHSs. We basically consider these scanners like normal when computing the rescan/invalidation scheme -- but naturally we don't need to consider them during the fixpoint computation.
Thanks for the fixes! Will this cause stdio <~ to behave more intuitively as well? It seemed to have the same problem. |
(courtesy @ilikerps)
Given a rule like
and a delete from
derived
, we'd expect thatbase
would "replenish" the deleted values fromderived
. This doesn't currently happen. See code below:The text was updated successfully, but these errors were encountered: