Commit graph

4 commits

Author SHA1 Message Date
Charles Lew
7267452ff1 Implement Setter API 2022-08-22 19:22:47 +08:00
XFFXFF
74e220ec39 update some tests 2022-08-22 15:32:29 +08:00
Niko Matsakis
70b50a1813 fix formatting 2022-08-17 07:38:03 -04:00
Niko Matsakis
9df075b63c reset accumulators on new revisions, etc
Accumulators don't currently work across revisions
due to a few bugs. This commit adds 2 tests to show
the problems and reworks the implementation strategy.

We keep track of when the values in an accumulator were pushed
and reset the vector to empty when the push occurs in a new
revision.

We also ignore stale values from old revisions
(but update the revision when it is marked as validated).

Finally, we treat an accumulator as an untracked read,
which is quite conservative but correct. To get better
reuse, we would need to (a) somehow determine when different
values were pushed, e.g. by hashing or tracked the old values;
and (b) have some `DatabaseKeyIndex` we can use to identify
"the values pushed by this query".

Both of these would add overhead to accumulators and I didn'τ
feel like doing it, particularly since the main use case for
them is communicating errors and things which are not typically
used from within queries.
2022-08-17 06:47:11 -04:00
Renamed from salsa-2022-tests/tests/accumulate-and-reuse.rs (Browse further)