Upsert readmodels #287
Replies: 6 comments 9 replies
-
Wow man, same! |
Beta Was this translation helpful? Give feedback.
-
I realise i didnt provide a lot of context. Check this out - its a min app which i think shows what im seeing. The checkpoint document gets created and is correct, and i can see the logs saying its handling the events in the projector etc, but no readmodel gets created. Just to be clear, i want the one HTTP POST to either create or update the read-model. I get the feeling im missing a peice of the puzzle? |
Beta Was this translation helpful? Give feedback.
-
The default options for update operations is using Here's the default options definition: static UpdateOptions DefaultOptions => new() { IsUpsert = true }; so it's either not being picked up, or it's something else. |
Beta Was this translation helpful? Give feedback.
-
Hi Alexy Here is a video of the issue, Thoughts? 2023-10-26.09-24-08.mp4 |
Beta Was this translation helpful? Give feedback.
-
Hi Alexey. Thanks for the effort looking into this issue. I noticed that you are running ESDB 23.X where we (and in the our docker-compose in the repro repo) we're using 20.X. When i re-run using the 23.X container, it all works as it should and is perfectly inline with your video. So, i guess the easy answer is to run ESDB 23.X - which is what we will do. Im hoping that this may provide some insight and help for you to try repro the issue with a 20.X container? |
Beta Was this translation helpful? Give feedback.
-
Looks like it was due to us using an older version of event store DB. When using ver 23.X and later, there seems to be no issue. |
Beta Was this translation helpful? Give feedback.
-
Hi i cant seem to get an upsert to work for the mongo projector.
There are 6 events in the stream.
I can see the checkpoint has been updated
![image](https://private-user-images.githubusercontent.com/146303125/276480261-3b7d40a1-67ac-47a5-ab29-0b638e3b1bde.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3NTgxNTAsIm5iZiI6MTcyMDc1Nzg1MCwicGF0aCI6Ii8xNDYzMDMxMjUvMjc2NDgwMjYxLTNiN2Q0MGExLTY3YWMtNDdhNS1hYjI5LTBiNjM4ZTNiMWJkZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ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zc5MjY2OGFlNTNjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.NJOezUZPz97mSJ-xIfBnZz1gQcXKz_EAiTbZKohdOJ8)
The https://eventuous.dev/docs/infra/mongodb mentions upserts are preferred and are on by default, but it doesnt seem to be working for me.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions