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

session_duration <= 0 should be ignored #98

Closed
jboehle opened this issue Jul 3, 2014 · 2 comments
Closed

session_duration <= 0 should be ignored #98

jboehle opened this issue Jul 3, 2014 · 2 comments
Assignees

Comments

@jboehle
Copy link
Contributor

jboehle commented Jul 3, 2014

When working on the Countly Android SDK, I fixed some issues that will stop the Android client from sending negative session_duration values to the server. However, due to existing SDK clients in the wild that may never be updated, the server should protect against negative session_duration values infiltrating the server database.

I believe this is related to the issue in support forums here.

@jboehle
Copy link
Contributor Author

jboehle commented Aug 7, 2014

This bug also causes some other bad data to be inserted into the database. It can cause 'null' to be added to 'meta.d-ranges', and it can cause 'undefined' to be added to .ds dictionaries.

I have committed a fix for this to my fork by checking for undefined calculatedDurationRange in the processSessionDurationRange method in usage.js and if it's undefined, don't update the 'sessions' collection.

I've also added to the bin/updateCollections.js script to clean up some of the bad data that this bug has created, please take a look and let me know what you think.

@ar2rsawseen
Copy link
Member

This was fixed in 4dc18b8

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

2 participants