Closed JoelCourtney closed 1 week ago
Does moving
Commit
inside of theInMemoryEditablePlan
help ease any anxieties about the shared ownership?
Nope. I just did it because the Commit class isn't used anywhere else, so I didn't want to make it look like it was part of a public interface.
Description
This PR implements a staleness check for the internal procedural scheduling implementations. The editable plan instance keeps track of sim results that it has produced using weak references, and can dynamically update their staleness if the plan is changed after it was simulated. The process is this:
The joint ownership freaks me out a wee bit, but I think it's safe because the commits are only used to keep the previous sets from getting gc'ed in the event of a rollback. Only the plan object actually mutates the set.
Verification
I added some unit tests to the scheduler-driver.
Documentation
This doesn't need to be explained to the user, but I've copied the above description into the doc comment on
InMemoryEditablePlan
.Future work