sryanyuan opened a new pull request, #3354:
URL: https://github.com/apache/kvrocks/pull/3354
### Background
Previously, Kvrocks allowed INCR on a key whose value was an empty string
(""),
treating it as zero and returning 1.
In Redis, the same operation results in an error:
ERR value is not an integer or out of range
This difference caused inconsistent behavior between Kvrocks and Redis.
### Changes
- Added check for empty string values before performing INCR
- Return error when value is an empty string, matching Redis behavior
### Result
Kvrocks now behaves consistently with Redis when performing INCR on empty
string values,
improving compatibility and reducing unexpected results in client
applications.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]