You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink CDC Issue Import (Jira)" <ji...@apache.org> on 2024/03/20 09:23:00 UTC

[jira] [Commented] (FLINK-34801) [Bug] An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_

    [ https://issues.apache.org/jira/browse/FLINK-34801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17828750#comment-17828750 ] 

Flink CDC Issue Import commented on FLINK-34801:
------------------------------------------------

Date: Sun Oct 08 19:19:00 CST 2023, Author: [hk-lrzy|https://github.com/hk-lrzy]

I meet same issue.
I think com.ververica.cdc.connectors.sqlserver.source.utils.SqlServerUtils.currentLsn should invoke `getMaxTransactionLsn`
rather than `getMaxLsn`
please double check for this, if it's correct i can submit a pr to fix it. @leonardBang 


> [Bug] An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-34801
>                 URL: https://issues.apache.org/jira/browse/FLINK-34801
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>            Reporter: Flink CDC Issue Import
>            Priority: Major
>              Labels: github-import
>
> ### Search before asking
> - [X] I searched in the [issues|https://github.com/ververica/flink-cdc-connectors/issues) and found nothing similar.
> ### Flink version
> 1.17.0
> ### Flink CDC version
> 2.4.1
> ### Database and its version
> sql server 2014
> ### Minimal reproduce step
> 1
> ### What did you expect to see?
> Caused by: java.lang.RuntimeException: SplitFetcher thread 22 received unexpected exception while polling the records
> 	at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:165)
> 	at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:114)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> 	... 1 more
> Caused by: org.apache.kafka.connect.errors.RetriableException: An exception occurred in the change event producer. This connector will be restarted.
> 	at io.debezium.pipeline.ErrorHandler.setProducerThrowable(ErrorHandler.java:46)
> 	at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.executeIteration(SqlServerStreamingChangeEventSource.java:458)
> 	at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.execute(SqlServerStreamingChangeEventSource.java:138)
> 	at com.ververica.cdc.connectors.sqlserver.source.reader.fetch.SqlServerStreamFetchTask$LsnSplitReadTask.execute(SqlServerStreamFetchTask.java:161)
> 	at com.ververica.cdc.connectors.sqlserver.source.reader.fetch.SqlServerScanFetchTask.execute(SqlServerScanFetchTask.java:123)
> 	at com.ververica.cdc.connectors.base.source.reader.external.IncrementalSourceScanFetcher.lambda$submitTask$0(IncrementalSourceScanFetcher.java:95)
> 	... 5 more
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: An insufficient number of arguments were supplied for the procedure or function cdc.fn_cdc_get_all_changes_ ... .
> 	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)
> 	at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:5471)
> 	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1794)
> 	at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1052)
> 	at io.debezium.pipeline.source.spi.ChangeTableResultSet.next(ChangeTableResultSet.java:63)
> 	at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.lambda$executeIteration$1(SqlServerStreamingChangeEventSource.java:269)
> 	at io.debezium.jdbc.JdbcConnection.prepareQuery(JdbcConnection.java:606)
> 	at io.debezium.connector.sqlserver.SqlServerConnection.getChangesForTables(SqlServerConnection.java:329)
> 	at io.debezium.connector.sqlserver.SqlServerStreamingChangeEventSource.executeIteration(SqlServerStreamingChangeEventSource.java:251]
> 	... 9 more
> ### What did you see instead?
> 希望修复这个报错
> ### Anything else?
> _No response_
> ### Are you willing to submit a PR?
> - [ ] I'm willing to submit a PR!
> ---------------- Imported from GitHub ----------------
> Url: https://github.com/apache/flink-cdc/issues/2354
> Created by: [tuyou-ly|https://github.com/tuyou-ly]
> Labels: bug, 
> Created at: Tue Aug 01 13:43:38 CST 2023
> State: open



--
This message was sent by Atlassian Jira
(v8.20.10#820010)