-
Notifications
You must be signed in to change notification settings - Fork 180
RUST-666 Add options for timeseries collection creation #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
9e3603b
b9d35f1
6733395
0a38dfa
cf1c6a2
2211c95
b76e001
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,8 +89,10 @@ pub struct CreateCollectionOptions { | |
/// Specifies options for creating a timeseries collection. | ||
pub timeseries: Option<TimeseriesOptions>, | ||
|
||
/// Number indicating after how many seconds old time-series data should be deleted. | ||
#[serde(deserialize_with = "bson_util::deserialize_duration_from_u64_seconds", | ||
/// Duration indicating after how long old time-series data should be deleted. | ||
#[serde( | ||
default, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know why this field needs to be explicitly marked as using the default when it's not present when others don't, but without this annotation some tests fail in deserialization complaining about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's because we provide special serialization / deserialization helpers for this field which override the default behavior. |
||
deserialize_with = "bson_util::deserialize_duration_from_u64_seconds", | ||
serialize_with = "bson_util::serialize_duration_option_as_int_secs")] | ||
pub expire_after_seconds: Option<Duration>, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we document here that this feature is only available on 5.0+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, done.