apache / apache/fluss

DelayedFetchLogOperation will not be trigged to complete when replica number set to 1

Open
#777 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.1k
Forks
625
Avg merge
3d 14h
Merged PRs (30d)
97

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/alibaba/fluss/issues) and found nothing similar.

### Fluss version

0.6.0 (latest release)

### Please describe the bug 🐞

In #768, we directly remove the `tryCompleteDelayedOperations in Replica#appendRecordsToLeader()`:

![Image](https://github.com/user-attachments/assets/36c365e7-2f23-4663-ae5a-9810ccef4318)

This may cause `DelayedFetchLogOperation` not be trigged to complete when replica number set to 1 because there are no follower to fetch log from leader and trigger complete `DelayedFetchLogOperation`. In this case, `DelayedFetchLogOperation` will only finished when the wait time timeout.

### Solution

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading Replica#appendRecordsToLeader() and tracing how DelayedFetchLogOperation is completed when the replica count is one. Compare the change referenced from #768 with the delayed-operation flow and verify the fix using the existing replication or fetch-operation tests; done means a single-replica setup completes the fetch without waiting for timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.