-
Notifications
You must be signed in to change notification settings - Fork 206
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
refactor: make write method object safe in WalManager #159
Conversation
@waynexia PTAL. |
Fancinating! I plan to review this later this day 🤩 |
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.
Thanks for submitting this PR. It looks good to me 👍
For overhead introduced here (Payload
becomes a trait object) we can find some way to alleviate it like changing the write
interface to directly accept encoded bytes. But this is beyond the scope of the refactor this time. And we are lacking of benchmark so don't know how much regression is brought actually.
I'm going to merge tomorrow if there is no other review.
Thanks for your suggestions.
I feel the same. we can decouple encoding from write of
Yes, we need a bench. |
* refactor: make write method object safe in WalManager * fix: clean unused code * fix: remove unused trait impl * fix: remove generic param in Writer
Which issue does this PR close?
Part of #72
Rationale for this change
Make WalManager object safe, so we can use Arc in other place.
What changes are included in this PR?
write
toWalManager
.Payload
.Are there any user-facing changes?
No
How does this change test
The refactor is tested by the compiler.