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
- 奇怪報錯資訊“db already exists with different case already have”解決方法
- The slave I/O thread stops because master and slave have equal MySQL server UUIDthreadASTMySqlServerUI
- Laravel redis 正則匹配keysLaravelRedis
- Redis Cluster原理Redis
- Redis Cluster 3.0Redis
- redis cluster 搭建Redis
- redis的command命令Redis
- 手把手教你做閱讀理解題-初中中考閱讀理解解題技巧009-There are many different parts that have different jobs
- Redis服務之Redis ClusterRedis
- Redis 中使用 scan 替換 keysRedis
- Redis 中 Keys 與 Scan 的使用Redis
- redis.cluster/memcached.cluster/wmware esxiRedis
- Redis cluster 叢集Redis
- redis cluster 擴容Redis
- Redis Cluster(叢集)Redis
- 認識Redis叢集——Redis ClusterRedis
- Redis的KEYS命令引起當機事件Redis事件
- 【Redis】redis遷移資料到redis-clusterRedis
- Redis Cluster 叢集部署Redis
- 搭建redis cluster叢集Redis
- redis cluster如何支援pipelineRedis
- Redis Manager 建立 Redis Cluster —— Docker 安裝RedisDocker
- 【Redis叢集實戰】Redis Cluster 部署Redis
- Redis Manager 建立 Redis Cluster —— 機器安裝Redis
- 【Redis】 redis-cluster刪除指定的keyRedis
- 【Redis】Redis Cluster-叢集故障轉移Redis
- redis cluster 設定密碼Redis密碼
- redis-官方cluster分割槽Redis
- Redis Cluster 叢集解決方案Redis
- redis-cluster主從搭建Redis
- 深度圖解Redis Cluster原理圖解Redis
- Redis Cluster叢集模式部署Redis模式
- 3.5 Different
- 詳解 Redis 中 big keys 發現和解決Redis
- Redis-cluster命令 cluster info 引數資訊解釋Redis