Skip to content

Improve log poll#103

Merged
luoyuxia merged 3 commits into
mainfrom
improve-log-poll
Dec 21, 2025
Merged

Improve log poll#103
luoyuxia merged 3 commits into
mainfrom
improve-log-poll

Conversation

@luoyuxia
Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #94

Brief change log

Tests

API and Format

Documentation

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the log polling mechanism by introducing asynchronous fetch request handling with a buffering system. The changes enable pipelined fetching where new fetch requests can be sent while the client processes previously fetched data, improving throughput and reducing latency.

Key Changes

  • Introduced LogFetchBuffer to manage pending and completed fetches with async notification support
  • Refactored LogFetcher to spawn async tasks for fetch requests, enabling non-blocking parallel fetching
  • Changed LogRecordsBatches from borrowed to owned data (using Bytes) to support cross-task data sharing
  • Added is_from_remote flag to ReadContext to handle projection differences between local and remote log reads

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
crates/fluss/src/client/table/log_fetch_buffer.rs New file implementing buffering system for log fetches with traits for pending/completed fetches
crates/fluss/src/client/table/scanner.rs Refactored poll() to use timeout-based retry logic; send_fetches() spawns async tasks for parallel fetching
crates/fluss/src/client/table/remote_log.rs Modified RemoteLogDownloadFuture to support completion callbacks; RemotePendingFetch implements PendingFetch trait
crates/fluss/src/record/arrow.rs Removed lifetimes from LogRecordsBatches/LogRecordBatch; added remote read support in ReadContext
crates/fluss/src/client/credentials.rs CredentialsCache now owns RpcClient and Metadata for simplified async usage
crates/fluss/tests/integration/table_remote_scan.rs Added projection test and increased timeout to accommodate async fetching delays
crates/fluss/tests/integration/table.rs Increased poll timeouts for integration tests
crates/fluss/src/client/table/mod.rs Added log_fetch_buffer module
crates/fluss/Cargo.toml Added scopeguard dependency for cleanup guards

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/fluss/src/client/table/log_fetch_buffer.rs Outdated
Comment thread crates/fluss/src/client/table/scanner.rs
Comment thread crates/fluss/src/record/arrow.rs
Comment thread crates/fluss/src/client/table/scanner.rs Outdated
Comment thread crates/fluss/src/client/table/remote_log.rs Outdated
Comment thread crates/fluss/src/client/table/remote_log.rs
Comment thread crates/fluss/src/record/arrow.rs Outdated
Comment thread crates/fluss/src/client/table/scanner.rs
Comment thread crates/fluss/src/client/table/scanner.rs
Comment thread crates/fluss/src/client/table/log_fetch_buffer.rs
Comment thread crates/fluss/src/client/table/scanner.rs Outdated
Comment thread crates/fluss/src/client/table/scanner.rs
Comment thread crates/fluss/src/client/table/remote_log.rs Outdated
Comment thread crates/fluss/src/client/credentials.rs
Comment thread crates/fluss/src/client/table/log_fetch_buffer.rs
Comment thread crates/fluss/src/client/table/scanner.rs
Comment thread crates/fluss/src/client/table/scanner.rs Outdated
@zhaohaidao
Copy link
Copy Markdown
Contributor

@luoyuxia Thanks for the pr. Left minor comments from resource management perspective. PTAL

@luoyuxia
Copy link
Copy Markdown
Contributor Author

@zhaohaidao @leekeiabstraction Thanks for your review. Comments addressed now. PTAL

@zhaohaidao
Copy link
Copy Markdown
Contributor

@zhaohaidao @leekeiabstraction Thanks for your review. Comments addressed now. PTAL

@LuoXia
Thanks very much, LGTM for me. Expecting read performance to take off🚀

@luoyuxia luoyuxia merged commit 076cbd6 into main Dec 21, 2025
13 checks passed
zhaohaidao pushed a commit to zhaohaidao/fluss-rust that referenced this pull request Jan 21, 2026
@luoyuxia luoyuxia deleted the improve-log-poll branch February 5, 2026 23:44
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.

poll record support prefetch

4 participants