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

MongoDB Eventstore has a 16MB limit of per aggregate root #23

Open
lucaswxp opened this issue May 15, 2020 · 1 comment
Open

MongoDB Eventstore has a 16MB limit of per aggregate root #23

lucaswxp opened this issue May 15, 2020 · 1 comment

Comments

@lucaswxp
Copy link

MongoDB has a 16MB limit per document hard-coded, since eventhus uses a single document to store the events, there's a limitation there.

I would recommend using per-document events, instead of per-document aggregates, and you can still make that atomic by simply removing the if condition here and remove entirely this else statement.

Of course, a change to Client.Load() to do a findAll instead of findOne, and sorting by the version later. What you guys think?

@ccamel
Copy link

ccamel commented Jun 9, 2020

@lucaswxp yes, I see your point but if you remove the condition on version here, you can no longer ensure the consistency of events when there're several services updating the aggregate concurrently.

Currently, the implemented !safe mode makes it possible to use optimistic locking for handling concurrent access for data.

What do you think?

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

No branches or pull requests

2 participants