Skip to content

Conversation

@v0y4g3r
Copy link
Contributor

@v0y4g3r v0y4g3r commented Jan 4, 2026

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

Add timestamp range to Flight DoPutMetadata to facilitate better ingestion performance.

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

Copilot AI review requested due to automatic review settings January 4, 2026 03:28
@v0y4g3r v0y4g3r requested review from a team, evenyag and waynexia as code owners January 4, 2026 03:28
@github-actions github-actions bot added size/XS docs-not-required This change does not impact docs. labels Jan 4, 2026
Add optional start_timestamp and end_timestamp fields to DoPutMetadata
to support time-windowed batch operations in the Flight DoPut API.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
@v0y4g3r v0y4g3r force-pushed the chore/add-timestamp-range-to-flight-meta branch from 6b759e5 to 4c6c27a Compare January 4, 2026 03:30
Copy link
Contributor

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 adds timestamp range metadata fields to the Flight protocol's DoPut operation to support better ingestion performance optimization. The changes allow clients to optionally specify time windows for data batches during Flight-based ingestion.

Key changes:

  • Adds optional start_timestamp and end_timestamp fields to DoPutMetadata with corresponding getter methods
  • Makes several MemtableStats fields public (estimated_bytes, time_range, max_sequence, series_count)

Reviewed changes

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

File Description
src/common/grpc/src/flight/do_put.rs Adds optional timestamp range fields to DoPutMetadata for time-windowed batch metadata
src/mito2/src/memtable.rs Changes visibility of MemtableStats fields from private to public

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

Comment on lines 51 to 57
pub fn start_timestamp(&self) -> Option<i64> {
self.start_timestamp
}

pub fn end_timestamp(&self) -> Option<i64> {
self.end_timestamp
}
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

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

The new timestamp fields (start_timestamp and end_timestamp) have getter methods but no setter methods or builder pattern. This makes the API incomplete - there's no way for clients to populate these fields after construction. Consider adding setter methods (e.g., with_start_timestamp, with_end_timestamp) following the builder pattern used elsewhere in the codebase, or provide a constructor that accepts these optional parameters.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
@v0y4g3r v0y4g3r force-pushed the chore/add-timestamp-range-to-flight-meta branch from c449ecb to c0ee918 Compare January 21, 2026 03:12
@v0y4g3r v0y4g3r added this pull request to the merge queue Jan 21, 2026
Merged via the queue into GreptimeTeam:main with commit 5916b51 Jan 21, 2026
43 checks passed
@v0y4g3r v0y4g3r deleted the chore/add-timestamp-range-to-flight-meta branch January 21, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs. size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants