-
Notifications
You must be signed in to change notification settings - Fork 0
refactor replDataBuffer #36
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## cluster-asm #36 +/- ##
==============================================
Coverage ? 68.60%
==============================================
Files ? 125
Lines ? 72994
Branches ? 0
==============================================
Hits ? 50078
Misses ? 22916
Partials ? 0
🚀 New features to boost your workflow:
|
src/replication.c
Outdated
| buf->blocks->free = zfree; | ||
| } | ||
|
|
||
| void replDataBufFree(replDataBuf *buf) { |
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.
see that there is also peak variable inside replDataBuf. For replicaOf, we don't clear it, so it is kind of a stat. I guess either we should move that variable out of replDataBuf or perhaps we should call this function replDataBufClear() instead. Otherwise, it sounds a bit confusing that we access a variable after "free" call for the struct.
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.
now i use replDataBufClear that is better than replDataBufFree
we don't clear it, so it is kind of a stat
for ASM, maybe we need to record the peak across all tasks. maybe we need a new struct: asmTaskManager, I want to use a slot map in it to quickly check if a slot is importing or migrating, for request filtering or write pausing, instead of iterating slot ranges.
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.
yeah, makes sense. perhaps we can reuse bitmap logic and keep track of importing migrating slots.
|
@ShooterIT Looks good to me. Just have minor comments. We can fix those issues later, as you wish. |
No description provided.