Skip to content

Maintain backward compatibility of LinkedQueue#8784

Merged
ghostdogpr merged 6 commits intozio:series/2.xfrom
ghostdogpr:fast-linked-queue
Apr 23, 2024
Merged

Maintain backward compatibility of LinkedQueue#8784
ghostdogpr merged 6 commits intozio:series/2.xfrom
ghostdogpr:fast-linked-queue

Conversation

@ghostdogpr
Copy link
Copy Markdown
Member

@ghostdogpr ghostdogpr commented Apr 23, 2024

We are getting a runtime error when using zio-cache with the latest zio snapshot because the constructor of LinkedQueue has been changed. To avoid that, keep LinkedQueue with metrics and directly use ConcurrentLinkedQueue where we don't need metrics.

Error was:

Exception in thread "zio-fiber-1942575583" java.lang.NoSuchMethodError: zio.internal.LinkedQueue: method 'void ()' not found
at zio.cache.Cache$CacheState$.initial(Cache.scala:369)
at zio.cache.Cache$.$anonfun$makeWithKey$3(Cache.scala:143)

@ghostdogpr ghostdogpr requested a review from kyri-petrou April 23, 2024 01:06
@ghostdogpr ghostdogpr merged commit 36c5641 into zio:series/2.x Apr 23, 2024
guizmaii added a commit that referenced this pull request Apr 8, 2025
…performances of `Queue.unbounded`

See also:
- #8784
- #8745
guizmaii added a commit that referenced this pull request Apr 8, 2025
…performances of `Queue.unbounded`

See also:
- #8784
- #8745
guizmaii added a commit that referenced this pull request Apr 8, 2025
…performances of `Queue.unbounded`

See also:
- #8784
- #8745
guizmaii added a commit that referenced this pull request Apr 9, 2025
…performances of `Queue.unbounded` (#9762)

* Bring back the `addMetrics` optimization of `LinkedQueue` to improve performances of  `Queue.unbounded`

See also:
- #8784
- #8745

* Review: prefer `<field> ne null` over using `addMetrics`
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.

2 participants