Skip to content

fix: cache stampede and remove verifySyncStatus from block endpoints#766

Closed
Sotatek-HenryDo wants to merge 2 commits into
developfrom
fix/cache-sync-status
Closed

fix: cache stampede and remove verifySyncStatus from block endpoints#766
Sotatek-HenryDo wants to merge 2 commits into
developfrom
fix/cache-sync-status

Conversation

@Sotatek-HenryDo

Copy link
Copy Markdown
Collaborator

This PR resolves a cache stampede issue on /network/status by adding sync = true to the @Cacheable annotation on getSyncStatus(), ensuring that only one thread queries the database on a cache miss while concurrent requests wait and reuse the cached result. To eliminate unnecessary cache checks on hot paths, we removed the verifySyncStatus() guard from the /block and /block/transaction endpoints in BlockApiImpl.java. Additionally, the concurrency test was hardened by using a CountDownLatch to trigger true simultaneous requests, adding a 5-second timeout to prevent CI deadlocks, and checking the returned values for consistency.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

✅ Preprod Tests: PASSED

📊 View Detailed Test Report

🔗 Action Run #410

Tests run against preprod network with live blockchain data

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

✅ Preprod Tests: PASSED

📊 View Detailed Test Report

🔗 Action Run #411

Tests run against preprod network with live blockchain data

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.

1 participant