kvrocks
kvrocks copied to clipboard
feat(stream): add XACKDEL command
fix : https://github.com/apache/kvrocks/issues/3120 (只写了XACKDEL)
This commit introduces the XACKDEL command for Redis streams with support for different acknowledgment strategies:
- KEEEREF: acknowledge entries in the specified group
- DELREF: acknowledge entries and remove from all other groups' PELs
- ACKED: acknowledge entries only if they are acknowledged by all groups
The command follows the syntax: XACKDEL key groupname strategy IDS numids id [id ...]
It returns an array of integers indicating the acknowledgment status for each entry ID.
我不懂c++
代码都是gemini3写的,因为xack和xdel都有实现,所以问题不大
让ai对照文档写了比较详细的测试,用下面的脚本可以测试
❯ cat test_xackdel.sh
#!/usr/bin/env bash
set -e
DIR=$(realpath $0) && DIR=${DIR%/*}
cd $DIR
set -x
./x.py format
./x.py build
cd tests/gocase
go test -v ./unit/type/stream/ -run TestXAckDel -args -binPath=$(pwd)/../../build/kvrocks -workspace=$(pwd)/workspace
go test -v ./unit/type/stream/ -run TestXAckDelDocExample -args -binPath=$(pwd)/../../build/kvrocks -workspace=$(pwd)/workspace