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

Update migrate_kv_to_redis.md #138

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devvit-docs/docs/migrate_kv_to_redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ export default Devvit;

# Troubleshooting

- When apps use `kvStore.list` - safe execution in a multi-tenant environment is not guaranteed - it causes CPU spikes and blocks other Redis commands from running at the same time. We recommend using Redis Hashes instead, each hash can store upto 4.2 billion key value pairs and a combination of `hscan`, `hgetall` and `hkeys` can be used for iteration. Please reach out to us in Discord - we can help adapt your existing data model to use Redis and improve performance and reliability of your app.
- When apps use `kvStore.list` - safe execution in a multi-tenant environment is not guaranteed - it causes CPU spikes and blocks other Redis commands from running at the same time. We recommend using Redis Hashes instead, each hash can store up to 4.2 billion key value pairs and a combination of `hscan`, `hgetall` and `hkeys` can be used for iteration. Please reach out to us in Discord - we can help adapt your existing data model to use Redis and improve the performance and reliability of your app.
- `kvStore.put` encodes the values with `JSON.stringify` and `kvStore.get` does `JSON.parse` to obtain the original data. If you are seeing returned values from `redis.get` wrapped in additional quotes during migration - add a try/catch block with `JSON.parse` to resolve the issue.