Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Current package versions:
| ------------ | ----------------- | ----- |
| [![StackExchange.Redis](https://img.shields.io/nuget/v/StackExchange.Redis.svg)](https://www.nuget.org/packages/StackExchange.Redis/) | [![StackExchange.Redis](https://img.shields.io/nuget/vpre/StackExchange.Redis.svg)](https://www.nuget.org/packages/StackExchange.Redis/) | [![StackExchange.Redis MyGet](https://img.shields.io/myget/stackoverflow/vpre/StackExchange.Redis.svg)](https://www.myget.org/feed/stackoverflow/package/nuget/StackExchange.Redis) |

## unreleased

- Fix incorrect debug assertion in `HGETEX` (no impact to release library) ([#2999 by mgravell](https://github.com/StackExchange/StackExchange.Redis/pull/2999))

## 2.10.1

- Support Redis 8.4 CAS/CAD operations (`DIGEST`, and the `IFEQ`, `IFNE`, `IFDEQ`, `IFDNE` modifiers on `SET` / `DEL`)
Expand Down
7 changes: 3 additions & 4 deletions src/StackExchange.Redis/RedisDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,9 @@ private Message HashFieldGetAndSetExpiryMessage(in RedisKey key, RedisValue[] ha
return HashFieldGetAndSetExpiryMessage(key, in hashFields[0], expiry, flags);
}

// precision, time, FIELDS, hashFields.Length
// precision, time, FIELDS, hashFields.Length, {N x fields}
int extraTokens = expiry.TokenCount + 2;

RedisValue[] values = new RedisValue[expiry.TokenCount + 2 + hashFields.Length];
RedisValue[] values = new RedisValue[extraTokens + hashFields.Length];

int index = 0;
// add PERSIST or expiry values
Expand All @@ -528,7 +527,7 @@ private Message HashFieldGetAndSetExpiryMessage(in RedisKey key, RedisValue[] ha
values[index++] = RedisLiterals.FIELDS;
values[index++] = hashFields.Length;
// check we've added everything we expected to
Debug.Assert(index == extraTokens + hashFields.Length);
Debug.Assert(index == extraTokens, $"token mismatch: {index} vs {extraTokens}");

// Add hash fields to the array
hashFields.AsSpan().CopyTo(values.AsSpan(index));
Expand Down
Loading