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

Bug Report: comment count TTL's in Redis 1000x higher than value set in Talk envs #2370

Open
TrevorNT opened this issue Jun 19, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@TrevorNT
Copy link

commented Jun 19, 2019

Do you want to request a feature or report a bug?

Report a bug

Intended outcome:

On our production deployments of Coral Talk, we set TALK_CACHE_EXPIRY_COMMENT_COUNT=60s, looking for the comment counts to refresh after 60 seconds.

Actual outcome:

When viewing the relevant comment count in Redis, we ran TTL on the cached comment count and noted that it had over 59900 seconds left until expiry. We believe this means that Coral Talk incorrectly set the cache expiry as 60000s.

How to reproduce the issue:

  1. Set TALK_CACHE_EXPIRY_COMMENT_COUNT=60s as noted above when launching a production instance of Coral Talk.
  2. Ping the GraphQL comment count endpoint on a particular article, thus retrieving its comment count.
  3. Access your Redis instance through the CLI (or telnet) and run command TTL cache.sbl[Comments.totalCommentCount][<<asset UUID>>].
  4. Observe that the returned TTL is far greater than 60s (returned TTL's from Redis are in seconds according to their documentation).

We tested our theory by setting TALK_CACHE_EXPIRY_COMMENT_COUNT=60ms and deploying production, and observed shortly afterward that newly created comment count cache entries had TTL's of less than 60 seconds.

Version and environment

Talk v4.8.0, running in Docker on EC2 instances in AWS. The relevant env vars have been attached to this issue as coral-talk-config.txt (JSON-formatted).

@kgardnr kgardnr added the bug label Jun 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.