commercetools / commercetools/commercetools-sync-java

Race Condition in LRU cache for references can lead to null references

Offen
#1,224 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
40
Forks
41
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**
The referenceResolver does occasionally resolve references to `null`.

The problem is, that the code, when resolving does first check which elements are already in the cache. It then fetches the "not yet in the cache" items and puts them there. This operation drops LRU items. Code still thinks that all items are in the cache and retrieves the references from the cache unchecked. Leading to `null`.

The symptom can be observed in SUPPORT-33245

**To Reproduce**
Steps to reproduce the behavior:
1. Call `` method with params ``
2. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.