dolittle / Home

Dolittle is a platform designed to build Line of Business applications without sacrificing architectural quality, code quality or scalability.

Home Page:http://www.dolittle.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read events from the MongoDB.Event store is claims as persisted in the OriginalContext

smithmx opened this issue · comments

https://github.com/dolittle-runtime/Runtime.Events.MongoDB/blob/96a61b0d72d76877a79716043e7554571b6b6688/Source/BsonValueExtensions.cs#L116

We can write the claims to the event store but we get an exception when attempting to read them back out.

This seems to be an intermittent bug. Not everyone experiences it which leads me to believe it is due to the content of the Claims. It's expecting to treat everything as strings but maybe something isn't?

I was able to provide a quick workaround but it's hacky and I don't want to keep doing that.

What I would suggest for a fix is this.

Do not persist any claims and do not read any claims. Claims can contain sensitive data so we shouldn't be storing that anyway. If we persist the Empty claims and return the empty claims, then the interface doesn't change and it's just a patch. It also won't be needed in the new design.

┆Issue is synchronized with this Asana task

Fixed as described. Claims are always Empty.