Giter Site home page Giter Site logo

Comments (5)

aarondav avatar aarondav commented on September 3, 2024

And additionally, even with a delta, only the delta is added to the downstream table.

from bud.

neilconway avatar neilconway commented on September 3, 2024

This might be related to #292 (which, unfortunately, seems like it will take some work to fix properly). I'll take a look...

from bud.

neilconway avatar neilconway commented on September 3, 2024

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.

  1. When a table receives a deletion, we mark it as invalidated; we we also want to (a) mark the table's scanner, if any, for rescan (b) mark any downstream nodes as both invalidated and needing rescan (c) mark any upstream nodes as needing rescan. Note that (b) is because downstream state should be blown away to prep for this table's rescan, whereas (c) is because we want to refill the table that received the deletion (e.g., because there might be another way to derive the deleted tuple). The problem is that the set of other elements to rescan/invalidate is associated with the table's scanner -- but only tables that appear on the RHS of rules have scanners (other would not have a scanner above). So the fix here is probably to move the set of to-rescan/to-invalidate elements to the collection itself.
  2. The code for computing the set of elements to rescan/invalidation upon deletion was just wrong; for each scanner s, the previous coding considered "what elements would need rescan/invalidation were s to need rescan?" This is the wrong hypothetical; the situation is that s has been invalidated, not that it needs rescan (e.g., if a scanner on a table is to be rescanned, we don't also need to rescan upstream nodes; whereas if the table is to be invalidated, we do).
  3. Next, the code neglected to consider the need to rescan nodes connected via <+ rules; it only did <= rules. Or at least, I suspect this is fishy; need to fix the first two issues first, which are problems regardless.

from bud.

aarondav avatar aarondav commented on September 3, 2024

Thanks for the fixes! Will this cause stdio <~ to behave more intuitively as well? It seemed to have the same problem.

from bud.

neilconway avatar neilconway commented on September 3, 2024

Nope; that issue is #292 (#297 is also related), which needs fixing separately. That's on my TODO list; hopefully I'll get a chance to fix it today or tomorrow.

from bud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.