-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
MultiStreamProjection: AppendEvent during RaiseSideEffects fails #3624
Comments
@Threepud What's the signature of your MultiStreamProjection? Specifically, what's the Id type? |
@jeremydmiller The ID type is string. |
And the normal event stream id type? |
Also string. |
Oh, sorry, just read the exception message better, I'm barking up the wrong tree. It's something else. Man, this is going to be rough to debug. Any chance you could do a repro project? It's something about the order of operations in the batch being updated by your multi-stream projection. |
Weird question, but do you know if it has anything to do with the |
And this probably isn't what you meant to do anyway: public override ValueTask RaiseSideEffects(IDocumentOperations operations, IEventSlice<BlaEvent> slice)
{
if (slice.Aggregate is null)
return ValueTask.CompletedTask;
slice.AppendEvent(new EventA());
return ValueTask.CompletedTask;
} That would be trying to apply the new event to a stream w/ the same id as the multi-stream document. |
I seriously doubt it. I think it's going wrong in the "apply callbacks" processing. Something is either advancing the reader or not advancing the reader incorrectly. |
I was trying to find a way to bridge the gap between a MultiStreamProjection and the FlatTableProjection. |
I'm not following that one. Do you do any deletes in your multi-stream projection? Anything besides just updating the aggregate documents? |
@Threepud What version of Weasel are you seeing in there? |
And I'm flummoxed. See how it seems to be completely losing the positional parameters in the SQL? |
I only did updating of the aggregate document. The package versions are as follows: Did you manage to replicate the issue on your end? |
Sorry, no, I didn't push through it enough. I'm kind of back to just not believing you. Might have to ask for a repro project. |
Hi Marten Team
I have an example where AppendEvent during RaiseSideEffects method works for the SingleStreamProjection<>, but not the MultiStreamProjection<>.
I see that the RaiseSideEffects for SingleStreamProjection is already covered in the test cases, so I will only provide the MultiStreamProjection example which doesn't work for me.
Excuse the dummy event names. I have been hitting my head against a wall trying to get this running.
When the exact same projection is converted to single stream, then
EventA
is added to the event stream as expected.MultiStreamProjection Example
Setup
BlaEventProjection
Errors Encountered
The interesting thing about this error is that the subscription I was testing with still thought the stream had progressed on, even though the persistence of the events had failed.
Please let me know if you need any other info. :)
The text was updated successfully, but these errors were encountered: