Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

feat(cache): Check cache capacity #514

Merged
merged 1 commit into from
May 20, 2020
Merged

Conversation

howjmay
Copy link
Contributor

@howjmay howjmay commented Mar 11, 2020

cache_occupied_space() would return the used size in caching database.
The default buffer maximum size is 170 MB.

When the capacity of redis server exceeds the maximun capacity, the
health_track thread will pop the oldest UUID and the corresponding
bundle.

To avoid data racing, at the moment that health track is cleaning
redis server, all the other thread is not able to to cache service.

Add the Document for buffer service.

close #488

@howjmay howjmay self-assigned this Mar 11, 2020
@howjmay howjmay added A-core Area - Internals and/or core implementation C-feature Category - feature labels Mar 11, 2020
utils/cache/backend_redis.c Outdated Show resolved Hide resolved
utils/cache/backend_redis.c Outdated Show resolved Hide resolved
@howjmay howjmay force-pushed the redis_cap branch 4 times, most recently from 7dc3532 to c8a7192 Compare March 13, 2020 02:22
@howjmay howjmay added the S-blocked Status - This PR has been blocked label Mar 14, 2020
@howjmay
Copy link
Contributor Author

howjmay commented Mar 22, 2020

Wait for the result in #525

@howjmay howjmay removed the S-blocked Status - This PR has been blocked label May 5, 2020
@howjmay howjmay force-pushed the redis_cap branch 3 times, most recently from 51a880b to 65a8e1f Compare May 5, 2020 03:30
@jserv
Copy link
Member

jserv commented May 5, 2020

Add high level descriptions about Redis-based caching in top-level documentation.

accelerator/cli_info.h Outdated Show resolved Hide resolved
@howjmay howjmay marked this pull request as ready for review May 5, 2020 10:51
@jserv jserv changed the title feat(cache): Check cache database capacity feat(cache): Check cache capacity May 5, 2020
@jserv
Copy link
Member

jserv commented May 5, 2020

Caching is a buffering technique that stores frequently-queried data in a temporary memory. It makes data easier to be accessed and reduces workloads for databases. We usually say "database cache", which is indeed buffering something for database workload. However, "cache database" is not so meaningful.

accelerator/config.c Show resolved Hide resolved
accelerator/config.c Show resolved Hide resolved
accelerator/config.h Outdated Show resolved Hide resolved
accelerator/core/core.c Show resolved Hide resolved
accelerator/core/core.c Show resolved Hide resolved
docs/transaction-buffer.md Show resolved Hide resolved
docs/transaction-buffer.md Show resolved Hide resolved
utils/cache/cache.h Show resolved Hide resolved
utils/cache/cache.h Show resolved Hide resolved
utils/cache/cache.h Outdated Show resolved Hide resolved
@jserv
Copy link
Member

jserv commented May 20, 2020

Rebasing is required.

accelerator/config.c Outdated Show resolved Hide resolved
accelerator/cli_info.h Outdated Show resolved Hide resolved
accelerator/config.c Outdated Show resolved Hide resolved
tests/unit-test/test_cache.c Outdated Show resolved Hide resolved
accelerator/cli_info.h Outdated Show resolved Hide resolved
Copy link
Member

@jserv jserv left a comment

Choose a reason for hiding this comment

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

SC_CACHE_LOCK and SC_CACHE_LOCK_ERROR are confusing

common/ta_errors.h Outdated Show resolved Hide resolved
utils/cache/cache.h Outdated Show resolved Hide resolved
accelerator/cli_info.h Outdated Show resolved Hide resolved
accelerator/config.c Outdated Show resolved Hide resolved
utils/cache/cache.h Outdated Show resolved Hide resolved
common/ta_errors.h Outdated Show resolved Hide resolved
`cache_occupied_space()` would return the used size in caching database.

When the capacity of redis server exceeds the maximun capacity, the
health_track thread will pop the oldest UUID and the corresponding
bundle.

To avoid data racing, at the moment that health track is cleaning
redis server, all the other thread is not able to cache service.

Add the Document for buffer service.

close DLTcollab#488
@howjmay howjmay requested a review from jserv May 20, 2020 16:21
@jserv jserv merged commit efa87d3 into DLTcollab:develop May 20, 2020
@howjmay howjmay deleted the redis_cap branch June 2, 2020 03:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-core Area - Internals and/or core implementation C-feature Category - feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache: Run a thread to check redis capacity
4 participants