Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error during connection to pub/sub is not transformed to stream failure #360

Closed
aludwiko opened this issue Feb 8, 2022 · 4 comments
Closed

Comments

@aludwiko
Copy link

aludwiko commented Feb 8, 2022

I noticed one thing. When I'm trying to connect to not existing subscription (or not yet created) stream is not failing. It hangs and it's not possible to capture the error in any way. On debugger I can see that this part of the code is invoked:

queue.put(Left(InternalPubSubError(failure)))

but somehow takeNextElement method is not returning anything.

@aludwiko
Copy link
Author

aludwiko commented Feb 8, 2022

After some more debugging, this line will never succeed:

queue.put(Left(InternalPubSubError(failure)))

because of InterruptedException during putLock.lockInterruptibly:

    public void put(E e) throws InterruptedException {
        if (e == null) throw new NullPointerException();
        final int c;
        final Node<E> node = new Node<E>(e);
        final ReentrantLock putLock = this.putLock;
        final AtomicInteger count = this.count;
        putLock.lockInterruptibly();

@bastewart
Copy link
Contributor

Ah, thanks for the report. @TimWSpence was looking to replace the queue implementation for performance reasons (#372) so this is definitely something we could/should fix at the same time.

@fugafree
Copy link

Hello @bastewart, may I ask what is the status of this? It is causing serious issues for us, as broken connections could stay unnoticed.

@alejandrohdezma
Copy link
Contributor

This issue should not be appearing on the new library fs2-pubsub but feel free to re-open if that is still the case and I'll investigate.

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

No branches or pull requests

4 participants