Skip to content

Conversation

@ShooterIT
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2025

Codecov Report

Attention: Patch coverage is 80.30303% with 26 lines in your changes missing coverage. Please review.

Please upload report for BASE (cluster-asm@b62dd59). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/cluster_asm.c 38.46% 24 Missing ⚠️
src/replication.c 97.84% 2 Missing ⚠️
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           
Files with missing lines Coverage Δ
src/server.h 100.00% <ø> (ø)
src/replication.c 86.94% <97.84%> (ø)
src/cluster_asm.c 65.98% <38.46%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

buf->blocks->free = zfree;
}

void replDataBufFree(replDataBuf *buf) {
Copy link
Owner

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.

Copy link
Collaborator Author

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.

Copy link
Owner

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.

@tezc
Copy link
Owner

tezc commented Jun 17, 2025

@ShooterIT Looks good to me. Just have minor comments. We can fix those issues later, as you wish.

@ShooterIT ShooterIT merged commit 2c945a2 into tezc:cluster-asm Jun 17, 2025
14 of 15 checks passed
@ShooterIT ShooterIT deleted the cluster-refactor-repl branch June 17, 2025 15:06
tezc pushed a commit that referenced this pull request Sep 10, 2025
tezc pushed a commit that referenced this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants