Skip to content
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

Add weight for cookies in async SLRU cache #545

Closed

Conversation

koct9i
Copy link
Collaborator

@koct9i koct9i commented Apr 23, 2024

Weighted cookie allows to reclaim space before inserting new value.
This helps to avoid temporary overcommit.

Cookie weight don't have to exactly match weight of final value,
and could be updated during insertion.

yt/yt/core/misc/async_slru_cache.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache-inl.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache-inl.h Show resolved Hide resolved
yt/yt/core/misc/unittests/async_slru_cache_ut.cpp Outdated Show resolved Hide resolved
@koct9i koct9i force-pushed the cookie-weight-for-async-slru-cache branch from 96c6e32 to 00d9ae9 Compare April 30, 2024 16:26
Copy link
Member

@gritukan gritukan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

yt/yt/core/misc/async_slru_cache-inl.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache-inl.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache-inl.h Outdated Show resolved Hide resolved
yt/yt/core/misc/async_slru_cache-inl.h Show resolved Hide resolved
@koct9i koct9i force-pushed the cookie-weight-for-async-slru-cache branch from f88f8b7 to 310242c Compare May 22, 2024 13:14
Weighted cookie allows to reclaim space before inserting new value.
This helps to avoid temporary overcommit.

Cookie weight don't have to exactly match weight of final value,
and could be updated during insertion.
@koct9i koct9i force-pushed the cookie-weight-for-async-slru-cache branch from 310242c to 9a3a150 Compare May 22, 2024 13:15
@maxim-babenko
Copy link
Collaborator

Shipped!

Copy link

robot-magpie bot commented May 23, 2024

@maxim-babenko has imported your pull request. If you are a Yandex employee, you can view this diff.

Copy link

robot-magpie bot commented May 27, 2024

✅ This pull request is being closed because it has been successfully merged.

@robot-magpie robot-magpie bot closed this May 27, 2024
robot-piglet pushed a commit that referenced this pull request May 27, 2024
Weighted cookie allows to reclaim space before inserting new value.
This helps to avoid temporary overcommit.

Cookie weight don't have to exactly match weight of final value,
and could be updated during insertion.

---
d10ca4aee44e6399d55fad57f6bb36003cc7ad08

Pull Request resolved: #545
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.

None yet

3 participants