Track and deleting of emitted streams #970
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #968
The emitted streams can be tracked if the user indicates that he/she wants
to do so. This is an additional parameter that can be passed when creating a projection.
The user also has the ability to indicate that he/she wants to delete the emitted streams of a projection if it has been tracked. This is an additional parameter that can be passed when deleting a projection.
For the above to work correctly (especially if the user creates another projection that emits to the previously deleted emitted streams), the
EmittedStream
needed to have it's logic adjusted for establishing whether an emitted stream is a new physical stream or not. Previously this was done by checking against the number of events in the read result. It has been adjusted to check whether theLastEventNumber
of the read result is -1 (NoStream)The ManagedProjection has also been reviewed and cleaned up as part of
this exercise.
The Projection Event Types have also extracted and moved into it's own class in a class called
ProjectionEventTypes