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

In-Memory Cache Crate #12312

Closed
wants to merge 2 commits into from
Closed

In-Memory Cache Crate #12312

wants to merge 2 commits into from

Conversation

just-in-chang
Copy link
Contributor

@just-in-chang just-in-chang commented Feb 29, 2024

Description

Design

Test Plan

Unit tests

Copy link

trunk-io bot commented Feb 29, 2024

⏱️ 9h 55m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-unit-tests 3h 14m 🟩🟩🟩🟩 (+3 more)
windows-build 3h 3m 🟩🟩🟩🟩🟩 (+4 more)
run-tests-main-branch 56m 🟥🟩🟩🟩🟩 (+5 more)
rust-lints 48m 🟩🟩🟩🟩 (+3 more)
test-fuzzers 37m 🟩
check 32m 🟩🟩🟩🟩🟩 (+4 more)
check-dynamic-deps 18m 🟩🟩🟩🟩🟩 (+5 more)
general-lints 18m 🟩🟩🟩🟩🟩 (+3 more)
semgrep/ci 4m 🟩🟩🟩🟩🟩 (+4 more)
file_change_determinator 2m 🟩🟩🟩🟩🟩 (+4 more)
file_change_determinator 2m 🟩🟩🟩🟩🟩 (+4 more)
permission-check 38s 🟩🟩🟩🟩🟩 (+4 more)
permission-check 32s 🟩🟩🟩🟩🟩 (+4 more)
permission-check 29s 🟩🟩🟩🟩🟩 (+4 more)
permission-check 24s 🟩🟩🟩🟩🟩 (+4 more)

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
rust-unit-tests 39m 31m +27%

settingsfeedbackdocs ⋅ learn more about trunk.io

@just-in-chang just-in-chang requested review from CapCap, bowenyang007 and a team March 1, 2024 01:37
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch 2 times, most recently from f78c7c7 to a6adf78 Compare March 8, 2024 22:00
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch from 7d2be46 to 4fb7d0a Compare March 14, 2024 20:40
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch 2 times, most recently from 7d91fe0 to 8df8bee Compare April 3, 2024 23:51
crates/aptos-in-memory-cache/src/caches/fifo.rs Outdated Show resolved Hide resolved
crates/aptos-in-memory-cache/src/lib.rs Outdated Show resolved Hide resolved
crates/aptos-in-memory-cache/src/caches/fifo.rs Outdated Show resolved Hide resolved
crates/aptos-in-memory-cache/src/caches/fifo.rs Outdated Show resolved Hide resolved
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch 3 times, most recently from f892e3d to ff71a06 Compare April 15, 2024 20:32
@larry-aptos
Copy link
Contributor

From the discussion, to avoid burst of garbage collection, we could set the eviction size close to target size.

like eviction size = 110% * target size.

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.4%. Comparing base (0b9eb46) to head (6c8a517).
Report is 27 commits behind head on main.

Current head 6c8a517 differs from pull request most recent head 8dcf743

Please upload reports for the commit 8dcf743 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #12312     +/-   ##
=========================================
- Coverage    59.0%    58.4%   -0.6%     
=========================================
  Files         817      821      +4     
  Lines      197089   197406    +317     
=========================================
- Hits       116316   115410    -906     
- Misses      80773    81996   +1223     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch 2 times, most recently from 6d1a633 to ee262ef Compare June 5, 2024 22:21
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch from ee262ef to f21aee5 Compare June 5, 2024 22:22
@just-in-chang just-in-chang reopened this Jun 5, 2024
Copy link
Contributor

@bowenyang007 bowenyang007 left a comment

Choose a reason for hiding this comment

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

Pushing back to your queue. General feedback is to document a lot more. Would also be helpful to highlight the design choices directly in code b/c we'll surely forget.

@just-in-chang just-in-chang marked this pull request as draft June 13, 2024 18:27
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch from 3be7842 to 23dc124 Compare June 13, 2024 22:04
@just-in-chang just-in-chang force-pushed the justin/in-memory-cache branch from 2d8a173 to 07952ba Compare June 24, 2024 21:20
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Aug 11, 2024
@github-actions github-actions bot closed this Aug 27, 2024
@just-in-chang just-in-chang reopened this Oct 11, 2024
@github-actions github-actions bot removed the Stale label Oct 12, 2024
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Nov 26, 2024
@larry-aptos
Copy link
Contributor

mark it not stale

@github-actions github-actions bot removed the Stale label Nov 27, 2024
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Jan 12, 2025
@just-in-chang
Copy link
Contributor Author

Let's just close this for now until we need to revisit it later 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants