No way to dispatch this command to Redis Cluster because keys have different slots.
解決辦法 :所有的集合和有序集合key都加一個字首,是的所有的資料都在一個redis叢集的終端。
private static final String prefix = "luffi:lbl";
private static final String KEY_SPLIT = ":"; //用於隔開快取字首與快取鍵值
//將文章放入時間排列表中
jedisCluster.zadd("{" + prefix + KEY_SPLIT + "}" + "time", Double.parseDouble(now + ""), articleid);
//將文章放入分數排列表中
jedisCluster.zadd("{" + prefix + KEY_SPLIT + "}" + "score", Double.parseDouble(now + VOTE_SCORE + ""), articleid);
//將文章id放入指定分類中
jedisCluster.sadd("{" + prefix + KEY_SPLIT + "}" + "group_" + group, articleid);
相關文章
- Different AG groups have the exactly same group_id value if the group names are same and the ‘CLUSTER_TYPE = EXTERNAL/NONE’None
- 批量刪除 redis keysRedis
- 【Redis】redis-cluster到redis-cluster的快速複製Redis
- Redis Cluster原理Redis
- redis cluster 搭建Redis
- Redis Cluster 3.0Redis
- Redis cluster on WindowsRedisWindows
- redis cluster 配置Redis
- Laravel redis 正則匹配keysLaravelRedis
- Couldn't be opened because you don't have permission to view it 執行時報錯View
- Redis服務之Redis ClusterRedis
- redis.cluster/memcached.cluster/wmware esxiRedis
- Redis cluster 叢集Redis
- redis cluster 擴容Redis
- redis-cluster心得Redis
- Redis Cluster(叢集)Redis
- Redis 中使用 scan 替換 keysRedis
- Redis 中 Keys 與 Scan 的使用Redis
- redis的command命令Redis
- 認識Redis叢集——Redis ClusterRedis
- 【Redis】redis遷移資料到redis-clusterRedis
- 奇怪報錯資訊“db already exists with different case already have”解決方法
- The slave I/O thread stops because master and slave have equal MySQL server UUIDthreadASTMySqlServerUI
- Redis的KEYS命令引起當機事件Redis事件
- Redis Cluster 叢集部署Redis
- 搭建redis cluster叢集Redis
- Redis Manager 建立 Redis Cluster —— Docker 安裝RedisDocker
- 手把手教你做閱讀理解題-初中中考閱讀理解解題技巧009-There are many different parts that have different jobs
- Redis Manager 建立 Redis Cluster —— 機器安裝Redis
- 【Redis】Redis Cluster-叢集故障轉移Redis
- 【Redis】 redis-cluster刪除指定的keyRedis
- Redis-cluster命令 cluster info 引數資訊解釋Redis
- redis cluster 設定密碼Redis密碼
- Redis Cluster 叢集解決方案Redis
- 深度圖解Redis Cluster原理圖解Redis
- redis-官方cluster分割槽Redis
- redis-cluster主從搭建Redis
- 優雅搭建redis-clusterRedis