Skip to content
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

Support for MongoDB TimeSeries expireAfterSeconds #4099

Open
Kruschenstein opened this issue Jul 1, 2022 · 1 comment · May be fixed by #4114
Open

Support for MongoDB TimeSeries expireAfterSeconds #4099

Kruschenstein opened this issue Jul 1, 2022 · 1 comment · May be fixed by #4114
Labels
status: waiting-for-triage An issue we've not yet triaged

Comments

@Kruschenstein
Copy link

Hello 🙂

Spring-data-mongodb supports TimeSeries since version 3.3. It allows to declare and create new timeseries collection. The @TimeSeries annotation offers many parameters such as those which are in the sub-object timeseries, (timeField, metaField and granularity). But there is no support for a field that comes with the TimeSeries arrival which is expireAfterSeconds (time series collections).

Regarding the code the CollectionOptions class, there is no field corresponding to expireAfterSeconds. Then if we want to create a time series with automatic expiration period, we must bypass the Spring classes and annotations (that's sad 🙁).

Is a support for the expireAfterSeconds planned for @TimeSeries? If not, I suggest to add the option to @TimeSerie annotation only. As mentionned in documentation:
expiredAfterSeconds

Optional. Enable the automatic deletion of documents in a time series collection by specifying the number of seconds after which documents expire. MongoDB deletes expired documents automatically.

(therefore, I don't understand why this option is not part of timeseries sub-object...)

I hope this proposal will interest you
Regards

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 1, 2022
bpfoster added a commit to bpfoster/spring-data-mongodb that referenced this issue Jul 14, 2022
bpfoster added a commit to bpfoster/spring-data-mongodb that referenced this issue Jul 14, 2022
@bpfoster bpfoster linked a pull request Jul 14, 2022 that will close this issue
4 tasks
@gbaso
Copy link

gbaso commented Apr 4, 2024

Is there any progress on this issue? Automatic expiration on time series is an important feature and it would be great to have spring support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants