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

CacheContext() writeFn should write emitted events as well #12912

Closed
colin-axner opened this issue Aug 11, 2022 · 2 comments · Fixed by #13063
Closed

CacheContext() writeFn should write emitted events as well #12912

colin-axner opened this issue Aug 11, 2022 · 2 comments · Fixed by #13063
Labels

Comments

@colin-axner
Copy link
Contributor

Summary

Calling context.CacheContext() and then writing the cacheContext should emit the events from the cached context as well

Problem Definition

Calling cache context followed by writeCache() does not emit the events emitted for the cached context since a new event manager has been used for the cached context. This causes the caller to also manually emit the events

Proposal

Modify the existing context.CacheContext() function to return a writeCache() function which also emits the cached events into the actual context event manager

@ValarDragon
Copy link
Contributor

This is a bug that would be really helpful if fixed. caused a bug with events in Osmosis & persistence that @puneet2019 fixed for us.

@yihuang
Copy link
Collaborator

yihuang commented Aug 26, 2022

yeah, caller site has been writing the events explicitly, not sure if there's use case that don't want to write the events, maybe add a boolean parameter to the write function?

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

Successfully merging a pull request may close this issue.

3 participants