Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Projections Recreation (Same named projections) #517

Merged
merged 1 commit into from Jun 13, 2015

Conversation

pgermishuys
Copy link
Contributor

This PR fixes an issue where deleted projections cannot be recreated.
In addition includes the deletion of the projections checkpoint stream.

When deleting a projection, ensure that a $ProjectionDeleted event is
written to $projections-$all
This event allows us to know which projections are actually alive.

When creating a projection, we check for the existence of a
$projections-[projection-name] stream. If this stream exists, we grab the
last known event number, increment it by one and that would be the version
for the projection.

Checkpoint stream for projection should be deleted when the user
requests for it to.

Should not hard delete the checkpoint stream (there might be a case where
the user wants to recreate the projection)

When loading the checkpoint, there might be a case where there are no
events as the stream has been deleted.

However, if we attempt to write to that checkpoint stream and tell it that we expect
the stream to not exist (Expected Version: -1), it will fail. We need to
cater for situations where the checkpoint stream is being reused for
instances where the projection gets recreated.
jen20 added a commit that referenced this pull request Jun 13, 2015
@jen20 jen20 merged commit f69aefa into release-3.0.6 Jun 13, 2015
@jen20 jen20 deleted the allow-projections-recreation branch June 13, 2015 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants