ca98am79 / connect-dynamodb

DynamoDB session store for Connect
http://ca98am79.github.com/connect-dynamodb/
MIT License
144 stars 66 forks source link

Breaking Date changes in 1.0.12 #45

Closed mgostisha closed 7 years ago

mgostisha commented 7 years ago

The date math introduced in version 1.0.12, moving from millisecond unix epoch timestamps to second unix epoch timestamps, breaks session reaping when using sessions across multiple servers that serve sites to the same domain.

One of our servers, running connect-dynamodb v1.0.11 was reaping sessions and comparing against millisecond epoch timestamps, thus deleting every session made by our other server, running connect-dynamodb v1.0.12, since these timestamps are always shorter than their millisecond-length counterparts.

This results in sessions lasting no longer than 10 minutes (default reapInterval), and users being logged out automatically.

I'd consider this a breaking change, which definitely shouldn't happen when updating the patch version.

mgostisha commented 7 years ago

Sorry, wrote this on mobile and made a typo. The v1.0.11 server is reaping sessions with second-length epoch timestamps, comparing with the current millisecond-length timestamp, resulting in all the sessions getting deleted as they're always shorter.

ca98am79 commented 7 years ago

thanks, sorry about this, I overlooked it. I've updated the major version number and updated the README with a note about the breaking change

mgostisha commented 7 years ago

No worries, just wanted to give you a heads up. Thanks for taking care of it so quick!

jd-carroll commented 6 years ago

@ca98am79 Can you please unpublish 1.0.12. Since 1.0.12 is a breaking change (as you indicated) the wrong semver should be removed.