Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
051adf4
Fix incorrect memory overhead calculation for watched keys (#3359)
enjoy-binbin Mar 17, 2026
164ce49
Make macOS leaks check skippable (#3370)
hpatro Mar 17, 2026
55362b6
Make scripting debug test skippable (#3368)
secwall Mar 17, 2026
d0a1d27
Add design-docs folder and README. (#3300)
murphyjacob4 Mar 17, 2026
8c32b38
Add AGENTS.md file for agentic coding assistant steering (#3371)
hpatro Mar 18, 2026
afb3b8b
remove duplicated lline (#3379)
ranshid Mar 18, 2026
4d4e774
Ensure the daily workflow uses gtest-parallel to run unit tests in is…
harrylin98 Mar 19, 2026
1d03901
CLUSTERSCAN MATCH pattern maps to a specific slot optimizations (#3380)
nmvk Mar 19, 2026
03bfdd9
fix benchmark queue and reduce the total duration (#3387)
roshkhatri Mar 19, 2026
f865c80
Pin workflow pip/go/npm dependencies for OpenSSF compliance (#3276)
roshkhatri Mar 20, 2026
5607fd6
Upload all benchmark artifacts including server logs (#3388)
roshkhatri Mar 20, 2026
6e3f532
Fix `valkey-cli --cluster del-node` for unreachable nodes (#3209)
yang-z-o Mar 23, 2026
70dc6f8
ci: include gtests in code coverage report
harrylin98 Mar 19, 2026
57e839d
Fix EntryTest.entryUpdate failure on macOS due to allocator differenc…
asagege Mar 25, 2026
ce140f0
ARM NEON SIMD optimization for pvFind() in vset.c (#3033)
ahmadbelb Mar 26, 2026
4fb0680
Do the failover immediately if the replica is the best ranked replica…
enjoy-binbin Mar 26, 2026
f009722
Fix race condition in diskless swapdb RedisModuleEvent_ReplAsyncLoad…
Nikhil-Manglore Mar 27, 2026
3301857
Show uname -a in RDMA CI job (#3418)
pizhenwei Mar 30, 2026
a26a102
Improve listpack threshold guidance in valkey.conf (#3419)
Tarte12 Mar 30, 2026
d1db275
fix test_entry to consider diffrerent allocator size classes (#3416)
ranshid Mar 30, 2026
b20ffa2
Handle EAGAIN in clusterWriteHandler (#3421)
enjoy-binbin Mar 30, 2026
8768d35
Optimize WATCH duplicate key check from O(N) to O(1) using per-db has…
enjoy-binbin Mar 31, 2026
eed7907
Reduce corrupt-dump-fuzzer tests from 10 to 1 minute (#3425)
zuiderkwast Apr 1, 2026
e821637
Increase timeout in flaky "failover immediately" test case (#3424)
zuiderkwast Apr 1, 2026
f1ddef6
Enhance cluster stale packet detection to prevent sub-replica and emp…
zhijun42 Apr 2, 2026
551e7f7
Fix some flaky tests (#3430)
zuiderkwast Apr 2, 2026
8d4240c
Big endian bitmap byte order mismatch fix (#3401)
nmvk Apr 3, 2026
779f364
Fix VLA warning in linenoise and enable -Werror (#3439)
madolson Apr 3, 2026
bc753a9
Avoid having server.h being included by cli and benchmark (#3420)
ranshid Apr 6, 2026
236827e
Grammar, spelling, and punctuation fixes across the summary fields fo…
heckj Apr 6, 2026
75c6c8d
Update maintainer affiliation (#3449)
lucasyonge Apr 6, 2026
4be6dbd
Increase embedded string threshold from 64 to 128 bytes (#3397)
Nikhil-Manglore Apr 7, 2026
9b15a10
Fix RDB expiry write length and leak when loading zipmap (#3422)
charsyam Apr 7, 2026
2b07cae
Fix some flaky tests using CLIENT REPLY OFF (#3452)
zuiderkwast Apr 8, 2026
06441b5
Skip faster-failover test under TLS (#3444)
nmvk Apr 8, 2026
db509fe
Fix slot-migration-max-failover-repl-bytes unable to accept -1 (#3443)
enjoy-binbin Apr 8, 2026
01e68d2
Attempt to deflake 'diskless no replicas drop during rdb pipe' (#3461)
zuiderkwast Apr 8, 2026
f1f5048
Fix config rewrite producing negative values for unsigned memory conf…
enjoy-binbin Apr 9, 2026
4cbf7cd
Fix trivial double-free issue in rdbLoadObject (#3453)
charsyam Apr 9, 2026
c385248
Increase timeouts in faster-failover test for slow CI runners (#3463)
roshkhatri Apr 9, 2026
844833a
Defer argument redaction by storing indices instead of rewriting argv…
rjd15372 Apr 9, 2026
0161a3d
Add cluster-config-save-behavior option to control nodes.conf save be…
enjoy-binbin Apr 10, 2026
82ba82f
Adds new (hidden) ValkeyModule_CallArgv API functions (#3122)
rjd15372 Apr 13, 2026
4a8dfec
Redesign IO threading communication model (#3324)
akashkgit Apr 13, 2026
766cd1a
Change rdbSaveStreamConsumers return type from size_t to ssize_t (#3499)
enjoy-binbin Apr 15, 2026
0c8f75f
Rewrite the faster failover test case (#3495)
enjoy-binbin Apr 16, 2026
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
11 changes: 5 additions & 6 deletions .github/workflows/benchmark-on-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
types: [labeled]

concurrency:
group: ec2-al-2023-pr-benchmarking-arm64
cancel-in-progress: false
group: benchmark-${{ github.event.pull_request.number }}-${{ github.event.label.name }}
cancel-in-progress: true

defaults:
run:
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
openssl-devel \
bzip2-devel \
libffi-devel
pip install -r requirements.txt
pip install --require-hashes -r requirements.txt

- name: Build latest valkey_latest
working-directory: valkey_latest
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
--target-ip ${{ secrets.EC2_ARM64_IP }}
--valkey-path "../valkey"
--results-dir "results"
--runs 5
--runs 3
)

# Run benchmark
Expand All @@ -132,8 +132,7 @@ jobs:
with:
name: ${{ github.event.label.name }}-results
path: |
./valkey-perf-benchmark/results/${{ github.event.pull_request.merge_commit_sha }}/metrics.json
./valkey-perf-benchmark/results/${{ github.event.pull_request.base.ref }}/metrics.json
./valkey-perf-benchmark/results/
comparison.md

- name: Comment PR with results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
openssl-devel \
bzip2-devel \
libffi-devel
pip install -r requirements.txt
pip install --require-hashes -r requirements.txt
- name: Build latest valkey_latest
working-directory: valkey_latest
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
if [[ ! -z "$dirty" ]]; then echo "$dirty"; exit 1; fi
- name: unit tests
run: |
./src/unit/valkey-unit-gtests
make test-unit

test-ubuntu-latest-compatibility:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,8 +116,7 @@ jobs:
./utils/gen-test-certs.sh
./build-release/runtest --verbose --tags -slow --dump-logs --tls
- name: unit tests
run: |
./build-release/bin/valkey-unit-gtests
run: make -C build-release test-unit

test-sanitizer-address:
runs-on: ubuntu-latest
Expand All @@ -144,7 +143,7 @@ jobs:
run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --dump-logs
- name: unit tests
run: |
./src/unit/valkey-unit-gtests
make test-unit

test-rdma:
runs-on: ubuntu-latest
Expand All @@ -168,6 +167,7 @@ jobs:
make -j4 BUILD_RDMA=yes USE_LIBBACKTRACE=yes
- name: clone-rxe-kmod
run: |
uname -a
mkdir -p tests/rdma/rxe
git clone https://github.com/pizhenwei/rxe.git tests/rdma/rxe
make -C tests/rdma/rxe
Expand Down Expand Up @@ -283,7 +283,9 @@ jobs:
GTEST_LIBS="/usr/lib32/libgtest.a /usr/lib32/libgmock.a"
- name: unit tests
run: |
./src/unit/valkey-unit-gtests
make test-unit \
GTEST_CFLAGS="-I/usr/src/googletest/googletest/include -I/usr/src/googletest/googlemock/include" \
GTEST_LIBS="/usr/lib32/libgtest.a /usr/lib32/libgmock.a"

build-libc-malloc:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -332,7 +334,7 @@ jobs:

- name: Setup YAML formatter
run: |
go install github.com/google/yamlfmt/cmd/yamlfmt@latest
go install github.com/google/yamlfmt/cmd/yamlfmt@v0.21.0

- name: Run yamlfmt
id: yamlfmt
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
- run: cd libbacktrace && ./configure && make && sudo make install
- name: Checkout Valkey
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install gtest
run: |
git clone --depth 1 -b v1.17.x https://github.com/google/googletest.git
cmake -S googletest -B googletest/build
cmake --build googletest/build -- -j$(nproc)
sudo cmake --install googletest/build
- name: Install lcov and run test
run: |
sudo apt-get install lcov tclx
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --accurate
make test-unit accurate=1
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --accurate
fi
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --accurate
make test-unit accurate=1
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --accurate
fi
Expand Down Expand Up @@ -283,7 +283,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --accurate
make test-unit accurate=1
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --accurate
fi
Expand Down Expand Up @@ -464,7 +464,9 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --accurate
make test-unit accurate=1 \
GTEST_CFLAGS="-I/usr/src/googletest/googletest/include -I/usr/src/googletest/googlemock/include" \
GTEST_LIBS="/usr/lib32/libgtest.a /usr/lib32/libgmock.a"
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --accurate
fi
Expand Down Expand Up @@ -843,8 +845,8 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/unit/valkey-unit-gtests --valgrind
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
./deps/gtest-parallel/gtest-parallel valgrind -- --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.%p.txt ./src/unit/valkey-unit-gtests --valgrind
if grep -qlE '0x[0-9A-Fa-f]+:' err.*.txt 2>/dev/null; then grep -lE '0x[0-9A-Fa-f]+:' err.*.txt | xargs cat; exit 1; fi
elif [ -f ./src/valkey-unit-tests ]; then
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-unit-tests --valgrind
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
Expand Down Expand Up @@ -931,8 +933,8 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/unit/valkey-unit-gtests --valgrind
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
./deps/gtest-parallel/gtest-parallel valgrind -- --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.%p.txt ./src/unit/valkey-unit-gtests --valgrind
if grep -qlE '0x[0-9A-Fa-f]+:' err.*.txt 2>/dev/null; then grep -lE '0x[0-9A-Fa-f]+:' err.*.txt | xargs cat; exit 1; fi
elif [ -f ./src/valkey-unit-tests ]; then
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-unit-tests --valgrind
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
Expand Down Expand Up @@ -996,7 +998,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests
make test-unit
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests
fi
Expand Down Expand Up @@ -1055,7 +1057,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --large-memory
make test-unit large_memory=1
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --large-memory
fi
Expand Down Expand Up @@ -1134,7 +1136,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --accurate
make test-unit accurate=1
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --accurate
fi
Expand Down Expand Up @@ -1193,7 +1195,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests --accurate --large-memory
make test-unit accurate=1 large_memory=1
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests --accurate --large-memory
fi
Expand Down Expand Up @@ -1268,7 +1270,7 @@ jobs:
if: true && !contains(github.event.inputs.skiptests, 'unittest')
run: |
if [ -f ./src/unit/valkey-unit-gtests ]; then
./src/unit/valkey-unit-gtests
make test-unit
elif [ -f ./src/valkey-unit-tests ]; then
./src/valkey-unit-tests
fi
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/reply-schemas-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ jobs:
- name: Setup nodejs
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
- name: Install packages
run: npm install ajv
working-directory: utils/reply-schema-linter
run: npm ci --ignore-scripts
- name: linter
run: node ./utils/reply_schema_linter.js
run: NODE_PATH=utils/reply-schema-linter/node_modules node ./utils/reply_schema_linter.js

56 changes: 56 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# AGENTS.md

## Scope
- These instructions apply to the entire repository unless a deeper `AGENTS.md` overrides them.

## Repo overview
- This is the Valkey server codebase.
- The main implementation lives under `src/`.
- Unit tests live under `src/unit`
- Integration tests live under `tests/`.
- Top-level `Makefile` forwards most targets into `src/Makefile`.

## Working guidelines
- Keep changes minimal and easy to backport.
- Match the style of the surrounding code instead of introducing new patterns.
- Avoid unrelated refactors in the same change.

## Build
- Default build: `make`
- Clean rebuild when build settings or bundled deps change: `make distclean && make`

## Unit tests
- Unit tests live under `src/unit/` and use GoogleTest (gtest/gmock).
- Build and run all unit tests: `make -C src test-unit`
- Unit tests cover data-structure and low-level logic changes.
- A single test filter can be run with: `make -C src test-unit && ./src/unit/valkey-unit-gtests --gtest_filter='<TestSuite>.<TestName>'`

## Integration tests
- Integration tests live under `tests/` and are written in Tcl.
- Run the full integration suite: `make test` (from the repo root).
- Run a single test file: `./runtest --single <path/to/test.tcl>`
- Additional specialized suites:
- Cluster tests: `./runtest-cluster`
- Sentinel tests: `./runtest-sentinel`
- Module API tests: `./runtest-moduleapi`
- For targeted validation, run the smallest relevant test scope first before broader suites.

## Code style
- Follow the repository conventions described in `DEVELOPMENT_GUIDE.md`.
- Most formatting is enforced by `clang-format`.
- CI uses `clang-format-18` across `*.c`, `*.h`, `*.cpp`, and `*.hpp` files.
- When touching C/C++ sources or headers, run `clang-format-18 -i` on the modified files before finalizing when the tool is available.
- Use comments for non-obvious behavior and rationale, not for restating code.

## Tests
- Code changes should include relevant tests when the repo already has a matching test location.
- Data-structure and low-level logic changes usually belong in `src/unit/` (C++ gtest).
- End-to-end behavior changes usually belong in `tests/` (Tcl integration tests).
- If behavior or commands change, check whether related documentation also needs updating.

## Files to avoid touching unless required
- Do not commit local runtime artifacts such as `dump.rdb`, `nodes.conf`, `*.log`, or ad hoc cluster directories unless the task explicitly requires them.
- Treat vendored dependency code under `deps/` as special-case changes; modify it only when the task clearly requires it.

## Pull Requests
Always push to the user's fork. Never push to the upstream valkey-io/valkey repository. Never push directly to unstable. If a user fork does not exist, ask the contributor to create one.
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Maintainers listed in alphabetical order by their github ID.
| ------------------- | ------------- | ----------- |
| Binbin Zhu | @enjoy-binbin | Tencent |
| Harkrishn Patro | @hpatro | Amazon |
| Lucas Yang | @lucasyonge | - |
| Lucas Yang | @lucasyonge | Percona |
| Madelyn Olson | @madolson | Amazon |
| Jacob Murphy | @murphyjacob4 | Google |
| Ping Xie | @pingxie | Oracle |
Expand Down
3 changes: 2 additions & 1 deletion cmake/Modules/SourceFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ set(VALKEY_SERVER_SRCS
${CMAKE_SOURCE_DIR}/src/entry.c
${CMAKE_SOURCE_DIR}/src/vset.c
${CMAKE_SOURCE_DIR}/src/fifo.c
${CMAKE_SOURCE_DIR}/src/mutexqueue.c)
${CMAKE_SOURCE_DIR}/src/mutexqueue.c
${CMAKE_SOURCE_DIR}/src/queues.c)


# valkey-cli
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/ValkeySetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ if (BUILDING_ARM64)
endif ()

if (APPLE)
add_valkey_server_linker_option("-rdynamic")
add_valkey_server_linker_option("-Wl,-export_dynamic")
add_valkey_server_linker_option("-ldl")
elseif (UNIX)
add_valkey_server_linker_option("-rdynamic")
Expand Down
2 changes: 1 addition & 1 deletion deps/linenoise/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
STD=
WARN= -Wall
WARN= -Wall -Werror
OPT= -Os

R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
Expand Down
8 changes: 5 additions & 3 deletions deps/linenoise/linenoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,9 @@ void linenoiseEditDeletePrevWord(struct linenoiseState *l) {
* when ctrl+d is typed.
*
* The function returns the length of the current buffer. */
/* Max length for CSI escape sequence parameter buffer */
#define SEQ_BUFFER_MAX_LENGTH 8

static int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, size_t buflen, const char *prompt)
{
struct linenoiseState l;
Expand Down Expand Up @@ -964,14 +967,13 @@ static int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, size_t buflen,
if (seq[1] >= '0' && seq[1] <= '9') {
/* Extended escape, read additional bytes.
* Examples: ESC [1;5C ESC [3~ */
const int seqBufferMaxLength = 8;
char seqBuffer[seqBufferMaxLength];
char seqBuffer[SEQ_BUFFER_MAX_LENGTH];
int i = 0;
seqBuffer[i++] = seq[1];

/* If first param is digit or ';', read more until we see a final in @~ */
char additionalChar;
while (i < seqBufferMaxLength-1 && read(l.ifd, &additionalChar, 1) != -1) {
while (i < SEQ_BUFFER_MAX_LENGTH-1 && read(l.ifd, &additionalChar, 1) != -1) {
seqBuffer[i++] = additionalChar;
if (additionalChar >= '@' && additionalChar <= '~') { /* CSI final byte */
seqBuffer[i] = '\0';
Expand Down
Loading
Loading