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

Add support for collection expiration to @TimeSeries. #4114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bpfoster
Copy link

@bpfoster bpfoster commented Jul 14, 2022

This will allow setting up automatic removal for time series collections (https://www.mongodb.com/docs/manual/core/timeseries/timeseries-automatic-removal/#set-up-automatic-removal-for-time-series-collections--ttl-), by adding an expireAfterSeconds or expire element to the @TimeSeries annotation.
Similar to @Indexed, expireAfterSeconds on will have a default of -1, and will not be used if it is <= 0. An error will be thrown if both expireAterSeconds and expire are defined. expire allows all the same expressions as are supported on @Indexed.

Closes #4099

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@pivotal-cla
Copy link

@bpfoster Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 14, 2022
@pivotal-cla
Copy link

@bpfoster Thank you for signing the Contributor License Agreement!

@christophstrobl
Copy link
Member

Thank you @bpfoster! To avoid the duplication in parsing the duration we're waiting for spring-projects/spring-framework#22474 to land in Framework 6 before bringing the changes in. Thanks for your understanding and patience.

@christophstrobl christophstrobl added status: on-hold We cannot start working on this issue yet type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 27, 2022
@mp911de mp911de added status: blocked An issue that's blocked on an external project change and removed status: on-hold We cannot start working on this issue yet labels Sep 16, 2022
@christophstrobl
Copy link
Member

Update - there's a PR (spring-projects/spring-framework#30396) targeting FW 6.1 timeframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked An issue that's blocked on an external project change type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for MongoDB TimeSeries expireAfterSeconds
5 participants