Commit graph

304 commits

Author SHA1 Message Date
Niko Matsakis
e5043a5644 make sum invoke is_current_revision_canceled deterministically 2019-01-04 13:51:09 -05:00
Niko Matsakis
da3be98295 extend cancellation test 2019-01-04 13:51:07 -05:00
Niko Matsakis
b3c7ec9f0d change cancelation mechanism and track "anon" reads when uncanceled 2019-01-04 13:50:50 -05:00
Niko Matsakis
d6990133b4 add debug logs 2019-01-04 08:39:59 -05:00
Niko Matsakis
f5871e4c2f revert transitive report_untracked_read change 2019-01-04 08:39:42 -05:00
Aleksey Kladov
a2198f1f8a prevent untracked queries from moving brackwards in time
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
2018-12-30 10:54:34 +03:00
Niko Matsakis
ac18a7215b
Merge pull request #102 from nikomatsakis/release-0.9.0
release 0.9.0
2018-12-28 10:33:37 -05:00
Niko Matsakis
beff7adbc4 release 0.9.0
- 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)
2018-12-28 10:26:27 -05:00
Niko Matsakis
b9227c1435
Merge pull request #96 from jrmuizel/patch-1
Link adapton and glimmer
2018-12-28 10:25:35 -05:00
Niko Matsakis
7074e258ba
Merge pull request #98 from matklad/debug
show SharedState in Debug for Runtime
2018-12-28 10:25:16 -05:00
Niko Matsakis
36d99f031f
Merge pull request #100 from matklad/upgrade-pl
Upgrade parking lot
2018-12-28 10:24:46 -05:00
Niko Matsakis
dd1b6edc01
Merge pull request #75 from nikomatsakis/issue-70
remove use of upgradable reads from derived queries
2018-12-28 10:20:36 -05:00
Aleksey Kladov
f9610df77e upgrade parking lot 2018-12-27 16:09:47 +03:00
Niko Matsakis
2e4ff9a26e remove use of upgradable reads from derived queries 2018-12-24 10:10:22 -05:00
Aleksey Kladov
52206d5421 show SharedState in Debug for Runtime
This should be useful to debug deadlocks due to bad forking.
2018-12-21 12:12:06 +03:00
Jeff Muizelaar
62d2b47b78
Link adapton and glimmer 2018-12-15 22:29:31 -05:00
Niko Matsakis
31789ec7ef
Merge pull request #95 from nikomatsakis/no-dynamic-dispatch
No dynamic dispatch for constructing query descriptors
2018-12-13 06:20:24 -05:00
Niko Matsakis
3cde493e4e remove the virtual fn call for creating query descriptors
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.
2018-12-13 05:51:45 -05:00
Niko Matsakis
5415100358
Merge pull request #94 from nikomatsakis/build-on-stable
build-on-stable etc
2018-12-13 05:36:46 -05:00
Niko Matsakis
2ec060e097 build-on-stable etc 2018-12-13 05:32:16 -05:00
Niko Matsakis
5c156e7157
Merge pull request #93 from nikomatsakis/toolchain
kill toolchain
2018-12-13 05:31:25 -05:00
Niko Matsakis
174e0edece kill toolchain
We now build on stable.
2018-12-13 05:13:31 -05:00
Niko Matsakis
92e57f4b8b
Merge pull request #92 from salsa-rs/matklad-patch-1
Don't publish rust toolchain
2018-12-13 05:11:51 -05:00
Aleksey Kladov
547ff0dfe3
Don't publish rust toolchain 2018-12-06 22:19:14 +03:00
Niko Matsakis
1af16d5d7c
Merge pull request #81 from kleimkuhler/issue-24-ensure-parallel-panic-safety
Ensure parallel panic safety
2018-11-04 06:22:28 -05:00
Niko Matsakis
ee62af42c2
Merge pull request #83 from memoryruins/patch-1
add badges to readme
2018-11-04 06:14:19 -05:00
Niko Matsakis
6dac59cd6f
Merge pull request #85 from matklad/debug-snapshot
make Snapshot Debug
2018-11-04 06:14:03 -05:00
Kevin Leimkuhler
bc60b09fc7 Refactor overwrite_placeholder into PanicGuard 2018-11-01 16:53:08 -07:00
Kevin Leimkuhler
461ab22822 Change uses of fork to snapshot 2018-11-01 11:26:16 -07:00
Kevin Leimkuhler
83482293c6 Use Event API and add docs 2018-11-01 11:26:16 -07:00
Kevin Leimkuhler
5bface5bb9 Ensure parallel panic safety and add test 2018-11-01 11:26:16 -07:00
Aleksey Kladov
229c0b944d make Snapshot Debug 2018-11-01 15:16:57 +03:00
Niko Matsakis
bfcca3059c
Merge pull request #84 from nikomatsakis/master
release 0.8.0
2018-11-01 06:06:28 -04:00
Niko Matsakis
4a8b9123e6 update hello-world 2018-11-01 05:59:33 -04:00
Niko Matsakis
206af35e2b release 0.8.0
- 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)
2018-11-01 05:56:03 -04:00
Niko Matsakis
642df84ed6
Merge pull request #82 from nikomatsakis/query-mut
introduce `query_mut` which you must use to get `set` methods
2018-11-01 05:55:12 -04:00
memoryruins
d77ba1707f
add badges to readme 2018-11-01 05:04:55 -04:00
Niko Matsakis
d689d02117 remove outdated note on atomicity; not a concern anymore 2018-11-01 05:03:09 -04:00
Niko Matsakis
341619d20e reorganize to put "how to implement this" at the end 2018-11-01 05:02:33 -04:00
Niko Matsakis
5a88871b9a improve snapshot docs
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)).
2018-11-01 05:01:13 -04:00
Niko Matsakis
a8ca57c06d document (and start warning on missing docs) 2018-11-01 04:57:52 -04:00
Niko Matsakis
49cc8abe43 introduce query_mut which you must use to get set methods 2018-11-01 04:53:56 -04:00
Niko Matsakis
981de0cac1
Merge pull request #78 from nikomatsakis/now-with-fewer-footguns
make `fork` give you a `Frozen<DB>`
2018-10-31 20:40:46 -04:00
Niko Matsakis
e070bf9809 s/Frozen/Snapshot/ 2018-10-31 20:06:06 -04:00
Niko Matsakis
fc2a720ae2 s/fork/snapshot/ 2018-10-31 20:05:31 -04:00
Niko Matsakis
5066726147 panic if you fork from inside a query for now 2018-10-31 16:03:03 -04:00
Niko Matsakis
2a6b8e07f9 remove the query_in_progress field 2018-10-31 15:59:00 -04:00
Niko Matsakis
252132f9b4 remove the start_query function, which is no longer needed 2018-10-31 13:31:29 -04:00
Niko Matsakis
b0171dbc11 remove fork_mut and adopt new strategy
Required simplifying the various tests.
2018-10-31 12:01:36 -04:00
Niko Matsakis
38dc4c31dd introduce fork, which yields a frozen handle 2018-10-31 06:05:03 -04:00