Skip to content

Commit

Permalink
chore: add comment for KafkaSplit's start_offset (#18766)
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <xxchan22f@gmail.com>
  • Loading branch information
xxchan authored Sep 30, 2024
1 parent 61b7459 commit 254dce9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/connector/src/source/kafka/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ use crate::source::{SplitId, SplitMetaData};
pub struct KafkaSplit {
pub(crate) topic: String,
pub(crate) partition: i32,
/// Note: currently the start offset is **exclusive**. We need to `+1` to create the reader.
/// Possible values are:
/// - `Earliest`: `low_watermark` - 1
/// - `Latest`: `high_watermark` - 1
/// - `Timestamp`: `offset_for_timestamp` - 1
/// - `last_seen_offset`
///
/// A better approach would be to make it **inclusive**. <https://github.com/risingwavelabs/risingwave/pull/16257>
pub(crate) start_offset: Option<i64>,
pub(crate) stop_offset: Option<i64>,
#[serde(skip)]
Expand Down

0 comments on commit 254dce9

Please sign in to comment.