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

CDC Polling mode get errors when source database restart #67

Open
luongdq opened this issue Nov 17, 2020 · 1 comment
Open

CDC Polling mode get errors when source database restart #67

luongdq opened this issue Nov 17, 2020 · 1 comment

Comments

@luongdq
Copy link

luongdq commented Nov 17, 2020

Description:

A Siddhi app with CDC polling mode get following errors when the source database restart.
These failures caused by the bug in DefaultPollingStrategy class, printEvent(connection) do not verify connection before using it.


[2020-11-17 18:48:50,328] ERROR {io.siddhi.extension.io.cdc.source.polling.strategies.DefaultPollingStrategy} - Error occurred while processing records in table SweetProductionTable. {mode=polling, app=CDCWithPollingMode, stream=insertSweetProductionStream} java.sql.SQLException: Connection is closed
at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.lambda$getClosedConnection$0(ProxyConnection.java:493)
at com.sun.proxy.$Proxy73.prepareStatement(Unknown Source)
at com.zaxxer.hikari.pool.ProxyConnection.prepareStatement(ProxyConnection.java:315)
at com.zaxxer.hikari.pool.HikariProxyConnection.prepareStatement(HikariProxyConnection.java)
at io.siddhi.extension.io.cdc.source.polling.strategies.DefaultPollingStrategy.printEvent(DefaultPollingStrategy.java:142)
at io.siddhi.extension.io.cdc.source.polling.strategies.DefaultPollingStrategy.poll(DefaultPollingStrategy.java:86)
at io.siddhi.extension.io.cdc.source.polling.CDCPoller.run(CDCPoller.java:202)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)


Suggested Labels:

bug
Suggested Assignees:

Affected Product Version:
2.0.6
OS, DB, other environment details and versions:

Steps to reproduce:

Related Issues:

@luongdq
Copy link
Author

luongdq commented Nov 24, 2020

This issue is fixed by adding isClosed() to check if db connection valid and get new connection if need. I've updated DefaultPollingStrategy.java

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

1 participant