mozilla / mentat

UNMAINTAINED A persistent, relational store inspired by Datomic and DataScript.
https://mozilla.github.io/mentat/
Apache License 2.0
1.65k stars 115 forks source link

Basic timelines support #783

Closed grigoryk closed 6 years ago

grigoryk commented 6 years ago

This PR adds support for basic timelines to the transactor along with ability to move ranges of transactions off-of the main timeline.

grigoryk commented 6 years ago

Tests are failing only on 1.25.0 since I'm pattern matching a reference w/ a non-reference pattern.

grigoryk commented 6 years ago

One thing that might be a bit dicey is making sure transactions stack up well on the target timeline.

The way we're currently thinking of this - as, essentially, a one-way scratch pad for purposes of sync - this isn't necessary. In fact, it's probably not possible to "make sure transactions stack up well", since we're moving just partial slices of the transaction log. What does it mean for one slice to be compatible (i.e. non-conflicting) with another?

Perhaps a good follow-up would be to ensure we can't move transactions onto a non-empty timeline, since there's a good chance that would be quite meaningless. That change would firm up this a little.

I'll address this in the work that will start using timelines.

grigoryk commented 6 years ago

@ncalexan I've addressed your feedback in a few separate "review" commits; take a look when you get a chance.

grigoryk commented 6 years ago

Err, tests are passing, failure on rust beta seems to be a fluke of sorts.