Skip to content

Conversation

@swuferhong
Copy link
Contributor

@swuferhong swuferhong commented Mar 28, 2025

Purpose

Linked issue: #685

This pr is aims to introduce batchDeliveryTimeout in client to expire batches that have been stuck for a long time. The purpose of this approach is to enable our Flink job can be recover the write operation by restarting the client via failover.

Brief change log

Tests

API and Format

Documentation

Copy link
Member

@wuchong wuchong left a comment

Choose a reason for hiding this comment

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

Could you add an IT case for this in FlussFailServerTableITCase (mock all servers are down and the request timeout)?

// TODO add logic for batch expire.
// check and expire batches if they have reached batch delivery timeout. This can avoid
// the client to wait for a long time while the batch is forever retry.
checkAndExpireBatches(now);
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the batch is expired here but is still in the sendWriteRequests(batches)? Will the expired batch still be sent to servers? What happens if the batches fail or success from the request?

@polyzos polyzos force-pushed the main branch 3 times, most recently from d88c76c to 434a4f4 Compare August 31, 2025 15:13
@swuferhong swuferhong closed this Dec 18, 2025
@swuferhong swuferhong deleted the reset-writerId branch December 18, 2025 11:52
@swuferhong swuferhong restored the reset-writerId branch December 29, 2025 12:31
@swuferhong swuferhong reopened this Dec 29, 2025
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

Successfully merging this pull request may close these issues.

Introduce batchDeliveryTimeout in client to expire batches that have been stuck for a long time

2 participants