-
Notifications
You must be signed in to change notification settings - Fork 177
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
RUST-666 Add options for timeseries collection creation #381
Conversation
|
||
/// 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 comment
The 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 missing field "expireAfterSeconds"
.
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.
I think it's because we provide special serialization / deserialization helpers for this field which override the default behavior.
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.
LGTM!
|
||
/// 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 comment
The 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.
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.
looks good! just one doc request
src/db/options.rs
Outdated
@@ -83,6 +85,17 @@ pub struct CreateCollectionOptions { | |||
|
|||
/// The default configuration for indexes created on this collection, including the _id index. | |||
pub index_option_defaults: Option<IndexOptionDefaults>, | |||
|
|||
/// Specifies options for creating a timeseries collection. |
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.
No description provided.