Skip to content

Comments

[INLONG-6780][Sort] Supports dirty data side-output for JDBC connector and related sinks#6921

Closed
Yizhou-Yang wants to merge 20 commits intoapache:masterfrom
Yizhou-Yang:jdbc-flush-exception
Closed

[INLONG-6780][Sort] Supports dirty data side-output for JDBC connector and related sinks#6921
Yizhou-Yang wants to merge 20 commits intoapache:masterfrom
Yizhou-Yang:jdbc-flush-exception

Conversation

@Yizhou-Yang
Copy link
Contributor

@Yizhou-Yang Yizhou-Yang commented Dec 16, 2022

add jdbc flush exception via batchmap (which is actually a batchset for jdbc)

fix #6780

private Long dataSize = 0L;
private Long rowSize = 0L;

private final Set<In> batchMap = new HashSet<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batchSet

@dockerzhang
Copy link
Contributor

@Yizhou-Yang please create a new issue to link this PR, thanks.

} catch (SQLException e) {
LOG.error("JDBC executeBatch error, retry times = {}", i, e);
if (i >= executionOptions.getMaxRetries()) {
clearBatch(e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you choose to throw an exception, there is no need to report dirty data

LOG.error(
"JDBC connection is not valid, and reestablish connection failed.",
exception);
clearBatch(exception);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you choose to throw an exception, there is no need to report dirty data

@Yizhou-Yang
Copy link
Contributor Author

Yizhou-Yang commented Dec 23, 2022

close for now, I don't think this is necessary to be merged rn,this pr does not change functionality.

will reopen if it is required in the future.

@Yizhou-Yang Yizhou-Yang deleted the jdbc-flush-exception branch March 13, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature][Sort] Supports dirty data side-output for JDBC connector and related sinks

4 participants