-
Notifications
You must be signed in to change notification settings - Fork 274
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
chore: cleanup unnecessary ndb.Commit
calls
#902
Conversation
WalkthroughThe recent modifications streamline the codebase by simplifying commit processes and batch operation logic. The changes remove unnecessary variables and parameters such as Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Just need to get cosmos-db sorted out for batch with flusher on osmosis
backport? |
not sure, @czarcas7ic osmosis implemented the db wrapper with flusher fully? |
@cool-develope I didn't understand how to implement in v0.37, see https://osmosis-network.slack.com/archives/C04LXMASL0P/p1708037594466689?thread_ts=1707244984.568649&channel=C04LXMASL0P&message_ts=1708037594.466689 |
Thanks for implementing this for our sdk fork @cool-develope! Seems we are unblocked to merge so we can test |
Sorry maybe I am not fully understanding how implementing with flusher has to do with this PR? In the PR you made @cool-develope, it seems like NewBatch and NewBatchWithSize still behave the same, which I thought that was what needed to be addressed https://github.com/osmosis-labs/cosmos-sdk/blob/6c1422877673277448bc14e2be415133cc6738e6/store/wrapper/tmdb.go#L52-L57 My apologies if my understanding is off here. |
|
Thanks for the explanation! |
@Mergifyio backport release/v1.1.x |
✅ Backports have been created
|
Co-authored-by: Adam Tucker <[email protected]> (cherry picked from commit 5a9cc69)
Co-authored-by: cool-developer <[email protected]>
Context
There are some unnecessary
ndb.Commit
andresetBatch
calls which introduced to avoid the large batch commit originally. They are not necessary since we are usingBatchWithFlusher
now.