📢 Hivemind Bug Fix: Solve the Problem of Users Having Empty Subscribed Content
Summary
We've fixed two critical bugs in the bridge.get_ranked_posts API endpoint that were affecting users when querying their subscribed communities.
Issues Fixed
1. Cache Key Bug for Personal Feed (tag='my')
Problem: When using bridge.get_ranked_posts with tag='my' to get posts from subscribed communities, the cache key was not including the observer_id. This caused different users (or the same user with different subscription states) to share the same cache entry, resulting in incorrect or empty results.
Impact: Users couldn't reliably get posts from their subscribed communities when using the tag='my' parameter.
Fix: The cache key now includes observer_id when tag='my', ensuring each user gets their personalized results correctly cached.
Commit: a3f1090266fe33400bb246afa97785bd297a0851
2. Query Timeout for created Sort
Problem: When using sort='created' with tag='my', the query had no time limit and would attempt to scan all historical posts from subscribed communities. For communities with large amounts of historical data (hundreds of thousands of posts), this caused query timeouts.
Impact: Users experienced request timeouts when trying to get posts sorted by creation date from their subscribed communities.
Fix: Added a 30-day time limit for created sort queries to prevent timeouts while still providing useful results.
Commit: 20f18f4eab44c49f9b778a0886b1e362d2a40a66
Technical Details
API Endpoint
bridge.get_ranked_posts
Parameters Affected
tag='my'- Personal feed from subscribed communitiessort='created'- Sort by creation date
Example Request
{
"jsonrpc": "2.0",
"method": "bridge.get_ranked_posts",
"params": {
"sort": "created",
"tag": "my",
"observer": "username"
}
}
Pull Request
These fixes are included in PR #358.
Status
✅ Fixed and Deployed
Both issues have been resolved and the fixes are now live. Users should now be able to:
- Reliably get posts from their subscribed communities using
tag='my' - Successfully query posts sorted by creation date without experiencing timeouts
Testing
If you were previously experiencing issues with:
- Empty results when using
tag='my' - Timeout errors when using
sort='created'withtag='my'
Please test again and confirm the issues are resolved. If you encounter any problems, please report them in the Hivemind GitHub repository.
Note: The cache for created sort has a 3-second TTL, so you may need to wait a few seconds after the fix is deployed before seeing the corrected behavior if you had previously cached empty results.
Upvoted! Thank you for supporting witness @jswit.