[fix]修正HyperLogLog.Merge对Key前缀的支持大石头 编写于 2024-08-27 11:23:32 大石头 提交于 2024-08-27 13:25:21
diff --git a/NewLife.Redis/HyperLogLog.cs b/NewLife.Redis/HyperLogLog.cs
index 0d8d217..3d9f5a3 100644
--- a/NewLife.Redis/HyperLogLog.cs
+++ b/NewLife.Redis/HyperLogLog.cs
@@ -60,7 +60,10 @@ public class HyperLogLog : RedisBase
};
foreach (var item in keys)
{
- args.Add(item);
+ if (Redis is FullRedis rds && !rds.Prefix.IsNullOrEmpty())
+ args.Add(item.EnsureStart(rds.Prefix));
+ else
+ args.Add(item);
}
return Execute((rc, k) => rc.Execute<String>("PFMERGE", args.ToArray()), true) == "OK";
}