salsa/salsa-2022-tests/tests
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
..
parallel define Jar struct separately 2022-08-10 07:28:13 +08:00
accumulate-from-tracked-fn.rs reset accumulators on new revisions, etc 2022-08-17 06:47:11 -04:00
accumulate-reuse.rs reset accumulators on new revisions, etc 2022-08-17 06:47:11 -04:00
accumulate.rs reset accumulators on new revisions, etc 2022-08-17 06:47:11 -04:00
cycles.rs define Jar struct separately 2022-08-10 07:28:13 +08:00
deletion-cascade.rs wire up salsa struct seletion, test it 2022-08-16 17:55:32 -04:00
deletion.rs wire up salsa struct seletion, test it 2022-08-16 17:55:32 -04:00
expect_reuse_field_x_of_a_tracked_struct_changes_but_fn_deponds_on_field_y.rs test: expect reuse field X changes but fn depends on field Y 2022-08-07 12:43:45 +08:00
expect_reuse_field_x_of_an_input_changes_but_fn_deponds_on_field_y.rs test: expect reuse field X changes but fn depends on field Y 2022-08-07 12:43:45 +08:00
hello_world.rs don't mark specified values as volatile 2022-08-10 00:42:32 -04:00
mutate_in_place.rs Rename compare_and_swap to mutate_in_place 2022-08-14 20:24:57 +03:00
specify_tracked_fn_in_rev_1_but_not_2.rs update expected logs 2022-08-16 17:58:51 -04:00
tracked_fn_on_input.rs make salsa-2022 tests into independent files 2022-08-06 10:43:43 -04:00
tracked_fn_on_tracked.rs add comments, remove dead-code lints 2022-08-10 00:42:32 -04:00
tracked_fn_on_tracked_specify.rs make salsa-2022 tests into independent files 2022-08-06 10:43:43 -04:00
tracked_fn_read_own_entity.rs don't mark specified values as volatile 2022-08-10 00:42:32 -04:00