Fix empty queue with broken connections #2340
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all,
in Apache StreamPipes we encountered an issue where, if a connection drops during a lease and reconnection subsequently fails, the container leaves behind a “zombie”
leasedConnectionas well as a non-empty queue containing futures that have already completed. To address this, we added aqueue.clear()call in theConnectionContainer.For StreamPipes we had temporarily copied the corresponding PLC4X classes [1] to apply this fix on our side. If this change is acceptable from your perspective, we can remove the duplicated PLC4X classes from the StreamPipes codebase.
I hope this update makes sense. If there’s anything else I should adjust, please let me know.
[1] https://github.com/apache/streampipes/tree/dev/streampipes-extensions/streampipes-connectors-plc/src/main/java/org/apache/streampipes/extensions/connectors/plc/cache