redis/tests/unit/type
debing.sun 95040d61d5
Replace INCREX out-of-bounds policy to a single SATURATE option (#15237)
Follow https://github.com/redis/redis/issues/15045

## Summary

Simplify INCREX's out-of-bounds policy:

The original INCREX shipped with three out-of-bounds policies — OVERFLOW
FAIL, OVERFLOW SAT, OVERFLOW REJECT — but FAIL and REJECT are
functionally redundant: both leave the key untouched when the result is
out of bounds. They differ only in how the caller is notified (error
reply vs. [current_value, 0] array reply), which forces the user to make
a stylistic choice with no real semantic difference.

This PR collapses the three policies into one clear behavior:

* Default: the operation is rejected; the key value and TTL are left
unchanged, and the reply is [current_value, 0]. Callers detect
non-application by checking the applied-increment field; no
error-handling branch is required.
* SATURATE: the result is saturated to UBOUND / LBOUND, or to the type
limits (LLONG_MAX/MIN for BYINT, ±LDBL_MAX for BYFLOAT) when no explicit
bound is given.

New syntax:

    INCREX <key> [BYFLOAT increment | BYINT increment]
                 [LBOUND lowerbound] [UBOUND upperbound] [SATURATE]
[EX seconds | PX milliseconds | EXAT seconds-timestamp | PXAT
milliseconds-timestamp | PERSIST] [ENX]

---------

Co-authored-by: Ozan Tezcan <ozantezcan@gmail.com>
2026-05-20 18:07:14 +08:00
..
array.tcl Implement the new Redis Array type (#15162) 2026-05-14 00:56:44 +08:00
hash-field-expire.tcl Increase threshold for HPEXPIRETIME persists after RDB reload test (#15047) 2026-04-17 16:36:02 +08:00
hash.tcl Fix issues with server.allow_access_expired (#14262) 2025-10-12 11:02:03 +08:00
incr.tcl Introduce DEBUG_DEFRAG compilation option to allow run test with activedefrag when allocator is not jemalloc (#14326) 2025-09-10 12:52:20 +08:00
increx.tcl Replace INCREX out-of-bounds policy to a single SATURATE option (#15237) 2026-05-20 18:07:14 +08:00
list-2.tcl dynamically list test files (#13220) 2024-05-30 19:09:26 +08:00
list-3.tcl Fix quicklist node not being recompressed correctly after inserting a new node before or after it (#10120) 2022-01-16 08:54:40 +02:00
list.tcl Fix brittle assert_match patterns for unexpected slowlog fields (#14948) 2026-04-13 14:45:14 +08:00
set.tcl Test tcp deadlock fixes (#14946) 2026-03-30 19:50:47 +08:00
stream-cgroups.tcl Fix double ERR prefix in XNACK error replies (#15091) 2026-04-22 09:12:04 +03:00
stream.tcl Fix stream_idmp_keys missing from database lifecycle ops (#14897) 2026-03-19 14:37:19 +02:00
string.tcl Batched MGET/MSET dict prefetch with dictType-driven payload hints (#15133) 2026-05-11 10:22:25 +08:00
zset.tcl perf: widen fast_float_strtod fast path to 17-19 digit mantissas (#15061) 2026-04-20 20:45:49 +08:00