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

ProjectView / DeleteEvent not run when rebuilding projections #1302

Closed
sturatcliffe opened this issue Jun 27, 2019 · 8 comments · Fixed by #1483
Closed

ProjectView / DeleteEvent not run when rebuilding projections #1302

sturatcliffe opened this issue Jun 27, 2019 · 8 comments · Fixed by #1483

Comments

@sturatcliffe
Copy link

When using ProjectView to configure a DeleteEvent as documented here:

http://jasperfx.github.io/marten/documentation/events/projections/custom/

My projected document is deleted as expected. However, when rebuilding projections as documented here:

http://jasperfx.github.io/marten/documentation/events/projections/#sec3

My projected document appears again. It seems that ProjectView is not run when rebuilding projections. A sample console app to show this can be found here:

https://github.com/sturatcliffe/MartenProjectViewIssue

@oskardudycz
Copy link
Collaborator

@sturatcliffe just giving you heads up - I'm working on it, I hope that I'll come up with something this weak.

@ericgreenmix
Copy link
Contributor

@oskardudycz Any update on your work on this? I hit this issue today.

@oskardudycz
Copy link
Collaborator

@ericgreenmix I was working on that, but it ended up with the refactoring. It's visible on draft PR #1322. Although after discussion with @jeremydmiller we will probably go deeper with refactoring. See more here: #1307 (you can put there also your comments about your thoughts/ideas).

If this is blocking you I can try to come up with some hotfix.

@ericgreenmix
Copy link
Contributor

Cool. We are not majorly impacted by this at-the-moment. We only have one projection has the

opt.Events.InlineProjections.AggregateStreamsWith<Project>();
opt.Events.ProjectView<Project, Guid>().DeleteEvent<ProjectDeleted>();

format. I think we can actually convert it to a ViewProjection, not using AggregateStreamsWith and get around this issue.

I have been reading through #1307 and will post some thoughts when I get time tomorrow.

@oskardudycz oskardudycz modified the milestones: 3.7.0, 3.8.0 Aug 21, 2019
@mysticmind mysticmind modified the milestones: 3.8.0, 3.9.0 Sep 17, 2019
@oskardudycz oskardudycz modified the milestones: 3.9.0, 3.10.0 Oct 2, 2019
@mysticmind mysticmind modified the milestones: 3.10.0, 3.11.0 Nov 11, 2019
@mysticmind mysticmind modified the milestones: 3.11.0, 3.12.0 Mar 25, 2020
@oskardudycz
Copy link
Collaborator

@sturatcliffe @ericgreenmix please have a look on #1483

It seems that the issue was fixed in one of the previous releases. I copied the repro from the linked project https://github.com/sturatcliffe/MartenProjectViewIssue.

Could you confirm that it works fine now?

@oskardudycz
Copy link
Collaborator

@sturatcliffe @ericgreenmix I managed to reproduce that. Fix will be available in 3.12.0

@oskardudycz
Copy link
Collaborator

@ericgreenmix @sturatcliffe, unfortunately, I needed to step back from the change, as it brought the regression. Fixing that would require either ugly hacks or rewrite the current solution. However that will happen in v4, so I'm reopening that and marking with v4 milestone.

@oskardudycz oskardudycz modified the milestones: 3.12.0, 4.0 Jun 10, 2020
@jeremydmiller
Copy link
Member

Everybody, the mechanics are so different in V4 that I don't believe this issue matters. There is no ProjectView() in V4, and the delete events are working with the new AggregateProjection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants