Skip to content

fix: CachedSpanFetcher no longer caches empty results permanently#79

Open
Curtis Galione (cjgalione) wants to merge 1 commit intomainfrom
curtis/cached_span_fetcher_fix
Open

fix: CachedSpanFetcher no longer caches empty results permanently#79
Curtis Galione (cjgalione) wants to merge 1 commit intomainfrom
curtis/cached_span_fetcher_fix

Conversation

@cjgalione
Copy link
Contributor

Summary

  • CachedSpanFetcher.get_spans() was setting _all_fetched = True even when the fetch returned no spans, permanently caching the empty result and preventing future re-fetches
  • Now only marks as fully fetched when the cache is non-empty, so subsequent calls will retry and pick up spans once they become available

Test plan

  • Updated test_handle_empty_results to verify re-fetch occurs when first call returned empty
  • Added test_empty_then_populated_refetches to confirm spans are returned on retry
  • Added test_empty_results_with_type_filter to confirm type-filtered path also handles empty results
  • Verified existing caching tests still pass (non-empty fetches are still cached)

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