-
Notifications
You must be signed in to change notification settings - Fork 23.5k
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
Solve issues with tracking test in external mode #9726
Conversation
The issue was that setting maxmemory to used_memory and expecting eviction is insufficient, since we need to take mem_not_counted_for_evict into consideration. This test got broken by redis#9166
@madolson please take a look. i'd like to merge this ASAP since it causes failures to all PRs and causes confusion. The change that broke it is that now when the replication backlog is growing, we consider it a mem_not_counted_for_evict, and in the past it was a static pre-allocation. |
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.
Sure, seems reasonable.
Thanks @oranagra i suspect my replication buffer breaks this test, but i can't find any clue |
@ShooterIT the reason your PR broke this test is that in the past, the replication backlog was pre-allocated, and also not considered a I.e. this test measured the amount of used memory, and then set a memory limit just above that, in order to trigger eviction. i.e. it assumed that when the reason i think this behavior change is probably ok (memory that is gradually growing and is counted for eviction, as i analyzed in #9166 (comment)), is that it cannot lead to an endless eviction feedback loop (since we only count the buffer size up to the configured limit), but i didn't foresee the possible collision with funny use cases. |
sorry, my previous post was a mess (forgot that the initial replication buffer up to the configured size is considered a "not counted memory", but in fact only the extra beyond the configured size is). edited the above post. |
Another attempt to solve the problem described in #9722
The issue was that setting maxmemory to used_memory and expecting
eviction is insufficient, since we need to take
mem_not_counted_for_evict into consideration.
This test got broken by #9166