question

Upvotes
Accepted
3 0 0 2

Concurrence issue in SelectableBiDirectionalQueue (package com.refinitiv.eta.valueadd.common) from the Java ETA API

Hi,


I am using the Java ETA API (https://github.com/Refinitiv/Real-Time-SDK/tree/master/Java). I think there is an issue with the way the _readLock and _writeLock are handled in the class SelectableBiDirectionalQueue (package com.refinitiv.eta.valueadd.common).

Indeed, on the method read() (respectively write()) the _readLock (respectively the _writeLock) is locked. There is a finally clause that unlock the locks, however in case of an IOException, the shutdown method is called. This method will set to null the two respective locks. So if a thread was waiting on the lock, then it will never be able to continue its execution further. Moreover the other thread that sets the lock to null will run into a NullPointerException while executing the finally clause.

Best regards,
Marjorie.

eta-api#technologyissuelocking
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
56k 145 45 65

@marjorie.mercadier

Thank you so much for sharing your finding.

You are correct. It could be a problem.

You can submit this issue directly to the development team via GitHub. After that, the development will verify this problem and then fix the code.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 0 0 2

Here is the link to the github issue: https://github.com/Refinitiv/Real-Time-SDK/issues/223

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.