chore: remove outdated comment

This commit is contained in:
Vladimir Mihailenco 2022-10-09 13:11:02 +03:00
parent d7dd9a732d
commit 1de0d2a1b7
2 changed files with 0 additions and 16 deletions

View File

@ -1743,8 +1743,6 @@ type XAddArgs struct {
Values interface{} Values interface{}
} }
// XAdd a.Limit has a bug, please confirm it and use it.
// issue: https://github.com/redis/redis/issues/9046
func (c cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd { func (c cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd {
args := make([]interface{}, 0, 11) args := make([]interface{}, 0, 11)
args = append(args, "xadd", a.Stream) args = append(args, "xadd", a.Stream)
@ -2081,22 +2079,14 @@ func (c cmdable) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *Int
return c.xTrim(ctx, key, "maxlen", false, maxLen, 0) return c.xTrim(ctx, key, "maxlen", false, maxLen, 0)
} }
// XTrimMaxLenApprox LIMIT has a bug, please confirm it and use it.
// issue: https://github.com/redis/redis/issues/9046
// cmd: XTRIM key MAXLEN ~ maxLen LIMIT limit
func (c cmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd { func (c cmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd {
return c.xTrim(ctx, key, "maxlen", true, maxLen, limit) return c.xTrim(ctx, key, "maxlen", true, maxLen, limit)
} }
// XTrimMinID No `~` rules are used, `limit` cannot be used.
// cmd: XTRIM key MINID minID
func (c cmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd { func (c cmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd {
return c.xTrim(ctx, key, "minid", false, minID, 0) return c.xTrim(ctx, key, "minid", false, minID, 0)
} }
// XTrimMinIDApprox LIMIT has a bug, please confirm it and use it.
// issue: https://github.com/redis/redis/issues/9046
// cmd: XTRIM key MINID ~ minID LIMIT limit
func (c cmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd { func (c cmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd {
return c.xTrim(ctx, key, "minid", true, minID, limit) return c.xTrim(ctx, key, "minid", true, minID, limit)
} }

View File

@ -4381,9 +4381,6 @@ var _ = Describe("Commands", func() {
Expect(id).To(Equal("3-0")) Expect(id).To(Equal("3-0"))
}) })
// TODO XTrimMaxLenApprox/XTrimMinIDApprox There is a bug in the limit parameter.
// TODO Don't test it for now.
// TODO link: https://github.com/redis/redis/issues/9046
It("should XTrimMaxLen", func() { It("should XTrimMaxLen", func() {
n, err := client.XTrimMaxLen(ctx, "stream", 0).Result() n, err := client.XTrimMaxLen(ctx, "stream", 0).Result()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
@ -4425,9 +4422,6 @@ var _ = Describe("Commands", func() {
})) }))
}) })
// TODO XAdd There is a bug in the limit parameter.
// TODO Don't test it for now.
// TODO link: https://github.com/redis/redis/issues/9046
It("should XAdd with MaxLen", func() { It("should XAdd with MaxLen", func() {
id, err := client.XAdd(ctx, &redis.XAddArgs{ id, err := client.XAdd(ctx, &redis.XAddArgs{
Stream: "stream", Stream: "stream",