mirror of
https://github.com/Lidarr/Lidarr.git
synced 2026-03-03 00:26:58 -05:00
I think the caching implementation is broken #746
Labels
No labels
Area: API
Area: Database
Area: Db-migration
Area: Download Clients
Area: Extras
Area: Import Lists
Area: Indexer
Area: Metadata API
Area: Notifications
Area: Organizer
Area: Parser
Area: Scanning
Area: Tooling
Area: UI
Area: Unit Tests
Area: Update API
On Hold: MetadataAPI Blocking
Priority: High
Priority: Low
Priority: Medium
Status: Accepted
Status: Cannot Reproduce
Status: Confirmed
Status: Don't Merge
Status: Help Wanted
Status: In Progress
Status: Info Needed
Status: Investigating
Status: Logs Needed
Status: Maybe One Day
Status: Needs Triage
Status: On Hold
Status: Ready for Review
Status: Unlikely
Status: Waiting for OP
Status: Won't Fix
Type: Bug
Type: Documentation
Type: Duplicate
Type: Enhancement
Type: Enhancement
Type: External Bug
Type: Feature Request
Type: Regression
Type: Support
Type: Support.
conflict
conflict
no-conflict
not-pulled
radarr-pull
readarr-pull
sonarr upstream
sonarr-pull
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Lidarr-Lidarr#746
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @glent1 on GitHub (May 26, 2020).
I've been trying to debug an issue whereby when using UsenetBlackhole downloading, ScanWatchFolder.GetItems never finds the cached items from the last pass. I think the problem is that the Set method in Cached.cs schedules a deletion of the key for 5 minutes in the future, but if an entry with the same key gets subsequently added (which it does at each pass), there is now a rogue deletion queued for some point in the future.
So (I think) if any download takes longer than 5 minutes, it can't ever complete because every time a value is added to the cache, there is a deletion for it scheduled at some point in the next minute, so it definitely won't be there a minute later.
I've changed my local implementation of Set to this ...
which I realise has a minor race condition in it, but I think it's tolerable. It seems to be working better for me.
Apologies if I've misunderstood what is going on, but this sort of timing issue is difficult to trace because the act of observation affects the results.
@glent1 commented on GitHub (May 26, 2020):
@ta264 - I can see that you added the scheduled delete in #592
@glent1 commented on GitHub (May 27, 2020):
Created a pull request to resolve.
@ta264 commented on GitHub (Oct 2, 2020):
Resolved in
07517e3abf