[PR #529] [MERGED] Change the caching strategy to minimize the locks and prevent deadlocks #522 #559

Closed
opened 2026-02-26 04:35:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mageddo/dns-proxy-server/pull/529
Author: @mageddo
Created: 8/1/2024
Status: Merged
Merged: 8/1/2024
Merged by: @mageddo

Base: masterHead: feat/522


📝 Commits (10+)

  • e9c9dc2 testing deadlock
  • 2d09900 removing calculate code from lock statement to prevent deadlocks
  • 777ac26 clean code
  • 51bc21f use single threaded queue to performe cache clear to prevent deadlocks
  • b3131ba clear cache in background
  • a50f69a add asserts
  • b992b51 release notes
  • ac76c0a [Gradle Release Plugin] - new version commit: '3.25.5-snapshot'.
  • 697a84a change thread name
  • a888fb3 change docs

📊 Changes

10 files changed (+225 additions, -21 deletions)

View changed files

📝 RELEASE-NOTES.md (+3 -0)
📝 gradle.properties (+1 -1)
src/main/java/com/mageddo/concurrent/SingleThreadQueueProcessor.java (+73 -0)
📝 src/main/java/com/mageddo/dnsproxyserver/solver/SolverCache.java (+30 -13)
📝 src/main/java/com/mageddo/dnsproxyserver/solver/SolverCacheFactory.java (+16 -6)
📝 src/main/java/com/mageddo/dnsproxyserver/solver/remote/dataprovider/SolverConsistencyGuaranteeDAOImpl.java (+1 -1)
src/test/java/com/mageddo/dnsproxyserver/solver/SolverCacheFactoryTest.java (+33 -0)
📝 src/test/java/com/mageddo/dnsproxyserver/solver/SolversCacheTest.java (+46 -0)
📝 src/test/java/testing/templates/MessageTemplates.java (+4 -0)
src/test/resources/logback-test.xml (+18 -0)

📄 Description

Relates to #522


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mageddo/dns-proxy-server/pull/529 **Author:** [@mageddo](https://github.com/mageddo) **Created:** 8/1/2024 **Status:** ✅ Merged **Merged:** 8/1/2024 **Merged by:** [@mageddo](https://github.com/mageddo) **Base:** `master` ← **Head:** `feat/522` --- ### 📝 Commits (10+) - [`e9c9dc2`](https://github.com/mageddo/dns-proxy-server/commit/e9c9dc2df19011ea6e37210c4e536f370e086cd1) testing deadlock - [`2d09900`](https://github.com/mageddo/dns-proxy-server/commit/2d0990015a01283fea62d1940aa49676b75639e7) removing calculate code from lock statement to prevent deadlocks - [`777ac26`](https://github.com/mageddo/dns-proxy-server/commit/777ac26376902980535447513cfd6a6f5e87a552) clean code - [`51bc21f`](https://github.com/mageddo/dns-proxy-server/commit/51bc21fdb88bd1b44e60bc57e8d98b15570bb7f5) use single threaded queue to performe cache clear to prevent deadlocks - [`b3131ba`](https://github.com/mageddo/dns-proxy-server/commit/b3131bad861e27eb067a345fc5a20032cb6d4934) clear cache in background - [`a50f69a`](https://github.com/mageddo/dns-proxy-server/commit/a50f69ae402329fd8e85ed82a8a88256fb5c21c0) add asserts - [`b992b51`](https://github.com/mageddo/dns-proxy-server/commit/b992b51fd2845cc915809487fc8cccdc808bf737) release notes - [`ac76c0a`](https://github.com/mageddo/dns-proxy-server/commit/ac76c0ad443accdebd704386a110c15cdbeb5220) [Gradle Release Plugin] - new version commit: '3.25.5-snapshot'. - [`697a84a`](https://github.com/mageddo/dns-proxy-server/commit/697a84a7e9c6bb491c759695ab2e977ca4c15b0e) change thread name - [`a888fb3`](https://github.com/mageddo/dns-proxy-server/commit/a888fb31305fbeebd2b58f10672fdc3b74df97de) change docs ### 📊 Changes **10 files changed** (+225 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `RELEASE-NOTES.md` (+3 -0) 📝 `gradle.properties` (+1 -1) ➕ `src/main/java/com/mageddo/concurrent/SingleThreadQueueProcessor.java` (+73 -0) 📝 `src/main/java/com/mageddo/dnsproxyserver/solver/SolverCache.java` (+30 -13) 📝 `src/main/java/com/mageddo/dnsproxyserver/solver/SolverCacheFactory.java` (+16 -6) 📝 `src/main/java/com/mageddo/dnsproxyserver/solver/remote/dataprovider/SolverConsistencyGuaranteeDAOImpl.java` (+1 -1) ➕ `src/test/java/com/mageddo/dnsproxyserver/solver/SolverCacheFactoryTest.java` (+33 -0) 📝 `src/test/java/com/mageddo/dnsproxyserver/solver/SolversCacheTest.java` (+46 -0) 📝 `src/test/java/testing/templates/MessageTemplates.java` (+4 -0) ➕ `src/test/resources/logback-test.xml` (+18 -0) </details> ### 📄 Description Relates to #522 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 04:35:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dns-proxy-server-mageddo#559
No description provided.