DelayedFetchLogOperation will not be trigged to complete when replica number set to 1
- 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()`:

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