Valkey 9.2's INCREX command eliminates crash risk in counter expiry pattern
Valkey 9.2 introduces a new command called INCREX that increments a key and sets its expiry in a single operation. This replaces a common two-step pattern where developers first increment a key and then, if it's new, set an expiry. The old pattern created a risk where a process could crash between the two commands, leaving a permanent key. Testing shows INCREX reduces network round trips, resulting in up to 2x faster performance for non-pipelined code. The primary benefit is eliminating the crash window, not just improving speed.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in