question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Caching results of the `filter` will result to inconsistent cache state

See original GitHub issue

Currently it blocks, but we just got lucky:

https://github.com/pytorch/text/blob/caaa8e3c08309fe2c40ae40efaf7c2adcf1a2c8a/torchtext/datasets/stsb.py#L85

Please change the order of filter and end_caching

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Nayef211commented, May 22, 2022

@VitalyFedyunin just wondering if this could be the cause of the test failures I’m seeing in my PR? https://github.com/pytorch/text/pull/1732#issuecomment-1132267901

0reactions
VitalyFedyunincommented, May 25, 2022

I just afraid that this filter pattern is error prone. And even if I fix deadlock (it is possible), putting filter might lead to cache inconsistency (in case of filter output change between runs).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache made consistent: Meta's cache invalidation solution
If a cache invalidation gets mishandled, it can indefinitely leave inconsistent values in the cache that are different from what's in the ...
Read more >
Caching - Gotchas & Lessons Learned - Manish Pandit's Blog
When data is found in the cache, it is called a hit, and a failure results in a miss. When a miss happens,...
Read more >
Advanced topics on caching in Apollo Client
This article describes special cases and considerations when using the Apollo Client cache. Bypassing the cache. Sometimes you shouldn't use the cache for...
Read more >
Cache Coherence and Synchronization - Tutorialspoint
Maintaining cache coherency is a problem in multiprocessor system when the processors contain local cache memory. Data inconsistency between different caches ...
Read more >
Confusion caching Active Record queries with Rails.cache.fetch
Please note that it's never a good idea to cache ActiveRecord objects. Caching an object may result in inconsistent states and values.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found