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

Mongo driver sets TTL index incorrectly #258

Open
bramvbilsen opened this issue Feb 8, 2024 · 0 comments
Open

Mongo driver sets TTL index incorrectly #258

bramvbilsen opened this issue Feb 8, 2024 · 0 comments

Comments

@bramvbilsen
Copy link

Setting the TTL for the mongodriver does currently not work as expected. The docs provide the following example (adjusted to trigger error):

maxAge := 30
store := mongodriver.NewStore(c, maxAge, true, []byte("secret"))

This will result in an error due to an integer overflow caused by:
https://github.com/laziness-coders/mongostore/blob/05d8c96df4538deba8a65fb43ba45b6e9e5d95df/mongostore.go#L61

This is however fixed in a newer version of the used mongodriver package, as can be seen in this PR:
laziness-coders/mongostore#1

I propose updating this dependency to ensure TTL indexes work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant