Skip to content

test(read_cache): bifurcate read_cache local modification tests for rapid writes - #4982

Open
vipnydav wants to merge 5 commits into
masterfrom
bifurcate-read-cache-rapid-writes
Open

test(read_cache): bifurcate read_cache local modification tests for rapid writes#4982
vipnydav wants to merge 5 commits into
masterfrom
bifurcate-read-cache-rapid-writes

Conversation

@vipnydav

@vipnydav vipnydav commented Aug 3, 2026

Copy link
Copy Markdown
Member

Description

Fixes LRU entry size calculation to prevent underflow and bifurcates read_cache local modification tests to support separate test runners for base runs and rapid-writes enabled runs.

Testing details

  1. Unit tests - Done
  2. Integration tests - Done

Any backward incompatible change? If so, please explain.

No

@vipnydav
vipnydav requested review from a team and meet2mky as code owners August 3, 2026 13:43
@vipnydav vipnydav added the execute-integration-tests Run only integration tests label Aug 3, 2026
@vipnydav
vipnydav requested a review from raj-prince August 3, 2026 13:43
@github-actions github-actions Bot added the remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR. label Aug 3, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several updates to the LRU cache implementation and integration tests. In lru.go, a size field is added to the entry struct to cache the entry size, preventing potential TOCTOU (Time-of-check to time-of-use) issues when entry sizes are updated dynamically. The invariant checks and cache operations are updated to use this cached size, and corresponding concurrency tests are added. Additionally, a missing file descriptor close is resolved in the integration test helpers, and integration tests are refactored to support rapid writes configurations for Pirlo buckets. As there are no review comments, I have no additional feedback to provide.

@vipnydav vipnydav added the execute-integration-tests-on-zb To run E2E tests on zonal bucket. label Aug 3, 2026
@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.85%. Comparing base (93ee10b) to head (7046338).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
internal/cache/lru/lru.go 86.36% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4982      +/-   ##
==========================================
- Coverage   83.86%   83.85%   -0.02%     
==========================================
  Files         173      173              
  Lines       21153    21160       +7     
==========================================
+ Hits        17741    17744       +3     
- Misses       2744     2747       +3     
- Partials      668      669       +1     
Flag Coverage Δ
unittests 83.85% <86.36%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vipnydav
vipnydav force-pushed the bifurcate-read-cache-rapid-writes branch from 7046338 to 8bfa21f Compare August 3, 2026 16:41
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@vipnydav
vipnydav force-pushed the bifurcate-read-cache-rapid-writes branch from a1200e1 to 5006443 Compare August 5, 2026 08:07
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Hi @meet2mky, @raj-prince, your feedback is needed to move this pull request forward. This automated reminder was triggered because there has been no activity for over 24 hours. Please provide your input when you have a moment. Thank you!

@vipnydav
vipnydav force-pushed the bifurcate-read-cache-rapid-writes branch from a51d2af to ee1b435 Compare August 7, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

execute-integration-tests Run only integration tests execute-integration-tests-on-zb To run E2E tests on zonal bucket. remind-reviewers Auto remind reviewers in attention set for review post 24hrs of inactivity on PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant