If a query observes an untracked read, it gets changed_at equal to the
current revision. When we re-validate the query later, if it doesn't
do an untracked read this time, it gets changed_at equal to the
maximum of the dependencies. Crucially, this new changed_at may
be **older** then the previous value of changed_at. That is, we break
the rule that `changed_at` monotonically increases.
This can lead to missed re-executions down the line (see the added
test).
closes#66
- Panic safety improvements (#81)
- We build on stable now (#94)
- Removed use of dynamic dispatch for constructing query
descriptors (#95)
- Technically a breaking change, though unlikely to affect clients
- Removed use of upgradable reads to avoid Amanieu/parking-lot#101 (#75)
- Upgraded parking lot (#100)
- Improved Debug output (#98)
- Snapshot implements Debug (#85)
Previously, to "make the connection" between the database type `DB` and
the query type `Q`, we were passing down a fn pointer that would crate
the query descriptor. But now we have this `GetQueryTable` trait -- use
that instead.
- major refactoring to the database APIs for safer parallel
processing (#78, #82):
- To set an input, you now write `db.query_mut(Query).set(...)`,
and you must declare your database as `mut`.
- To fork a thread, you now write `db.snapshot()`, which acquires
a read-lock that is only released when the snapshot is dropped
(note that this read-lock blocks `set` from occuring on the main
thread).
- Therefore, there can only be one mutable handle to the
database; all other handles are snapshots. This eliminates a variety
of complex and error-prone usage patterns.
- introduced the `salsa_event` callback that can be used for logging
and introspection (#63)
Using two snapshots from the same thread isn't really very easy to do,
so we don't have to warn about that really (it's really nested use of
snapshots that's a problem, and to do that you have to use thread-locals
or something just to get the snapshot *into* the database -- at that
point, something is really going wrong)).