Skip to content

Commit 679d781

Browse files
author
Devdutt Shenoi
committed
doc: explain purpose of schema versioning
1 parent 9e773a9 commit 679d781

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/metadata.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ pub static STREAM_INFO: Lazy<StreamInfo> = Lazy::new(StreamInfo::default);
4747
#[derive(Debug, Deref, DerefMut, Default)]
4848
pub struct StreamInfo(RwLock<HashMap<String, LogStreamMetadata>>);
4949

50+
/// In order to support backward compatability with streams created before v1.6.4,
51+
/// we will consider past versions of stream schema to be v0. Streams created with
52+
/// v1.6.4+ will be v1.
5053
#[derive(Clone, Copy, Debug, Default, Deserialize, Serialize, PartialEq, Eq)]
5154
#[non_exhaustive]
5255
#[serde(rename_all = "lowercase")]
5356
pub enum SchemaVersion {
5457
#[default]
5558
V0,
59+
/// Applies generic JSON flattening, ignores null data, handles all numbers as
60+
/// float64 and uses the timestamp type to store compatible time information.
5661
V1,
5762
}
5863

0 commit comments

Comments
 (0)