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

[client] Introduce batchDeliveryTimeout in client to expire batches that have been stuck for a long time #686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swuferhong
Copy link
Collaborator

@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?

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