Skip to content

Commit

Permalink
review fix 0
Browse files Browse the repository at this point in the history
  • Loading branch information
VCgege committed Dec 16, 2024
1 parent fd0fe16 commit 94ddde9
Show file tree
Hide file tree
Showing 8 changed files with 563 additions and 591 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
submodules: true
- name: get rocksdb sha
id: rocksdb-sha
run: |
Expand All @@ -31,10 +31,9 @@ jobs:
key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_SHA }}
- name: unit-test
run: |
sudo apt-get update
sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6
make unit-test -j8
sudo apt-get update
sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6
make unit-test -j8
mem:
strategy:
matrix:
Expand Down Expand Up @@ -64,7 +63,6 @@ jobs:
make -j8
- name: make test
run: make test

swap:
strategy:
matrix:
Expand Down Expand Up @@ -94,7 +92,6 @@ jobs:
make -j8
- name: make test
run: make test-disk

swap-asan:
strategy:
matrix:
Expand Down Expand Up @@ -122,7 +119,7 @@ jobs:
sudo apt-get update
sudo apt-get -y install libsnappy-dev zlib1g-dev libstdc++6
make SANITIZER=address -j8
- name: make test
- name: make test
run: make test-asan-disk


4 changes: 2 additions & 2 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- name: test
run: |
sudo apt-get install tcl8.6 tclx -y
./runtest --swap-mode disk --sanitizer --accurate --verbose --dump-logs
./runtest --swap-mode disk --tags -nosanitizer --accurate --verbose --dump-logs
- name: unittest
run: ./src/redis-server test all

Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
- name: test
run: |
sudo apt-get install tcl8.6 tclx -y
./runtest --swap-mode disk --sanitizer --accurate --verbose --dump-logs
./runtest --swap-mode disk --tags -nosanitizer --accurate --verbose --dump-logs
- name: unittest
run: ./src/redis-server test all

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ test-disk: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) $(REDIS_CLI_NAME) $(REDI
@(cd ..; ./runtest --swap-mode disk)

test-asan-disk: $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME)
@(cd ..; ./runtest --swap-mode disk --sanitizer)
@(cd ..; ./runtest --swap-mode disk --tags -nosanitizer)

test-modules: $(REDIS_SERVER_NAME)
@(cd ..; ./runtest-moduleapi)
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/logging.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ if {$system_supported} {

# Valgrind will complain that the process terminated by a signal, skip it.
# Sanitizer will cause unknown crash, which seems a problem of gcc or sanitizer, skip it.
if {!$::valgrind && !$::sanitizer} {
if {!$::valgrind} {
set server_path [tmpdir server1.log]
start_server [list overrides [list dir $server_path]] {
start_server [list overrides [list dir $server_path] tags {"nosanitizer"}] {
test "Crash report generated on SIGABRT" {
set pid [s process_id]
exec kill -SIGABRT $pid
Expand Down
72 changes: 35 additions & 37 deletions tests/swap/integration/client_rate_limit_bug.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,42 @@ proc format_command {args} {
}
set _ $cmd
}
start_server [list overrides [list save ""] ] {
if {!$::sanitizer} {
set master [srv 0 client]
$master config set swap-ratelimit-maxmemory-percentage 100
$master config set maxmemory-policy allkeys-lru
$master config set maxmemory 20MB
$master config set swap-debug-evict-keys 0
$master config set hz 100
# puts [randstring 100000 100000 binary]
set host [srv 0 host]
set port [srv 0 port]
set load_handles []
set j 0
for {set j 0} {$j < 20} {incr j} {
set load_handle [start_hash_hset $host $port 0 [expr {$j * 100}] [expr {($j +1)*100 }] ]
lappend load_handles $load_handle
}
after 1000
wait_for_condition 1000 500 {
[$master dbsize] == 2000
} else {
fail "Fail to full sync"
}
start_server [list overrides [list save ""] tags {"nosanitizer"}] {
set master [srv 0 client]
$master config set swap-ratelimit-maxmemory-percentage 100
$master config set maxmemory-policy allkeys-lru
$master config set maxmemory 20MB
$master config set swap-debug-evict-keys 0
$master config set hz 100
# puts [randstring 100000 100000 binary]
set host [srv 0 host]
set port [srv 0 port]
set load_handles []
set j 0
for {set j 0} {$j < 20} {incr j} {
set load_handle [start_hash_hset $host $port 0 [expr {$j * 100}] [expr {($j +1)*100 }] ]
lappend load_handles $load_handle
}
after 1000
wait_for_condition 1000 500 {
[$master dbsize] == 2000
} else {
fail "Fail to full sync"
}

for {set j 0} {$j < 20} {incr j} {
set ele [lindex $load_handles $j]
stop_bg_complex_data $ele
}
for {set j 0} {$j < 20} {incr j} {
set ele [lindex $load_handles $j]
stop_bg_complex_data $ele
}

# hget
for {set j 0} {$j < 100} {incr j} {
set load_handle [start_hash_hget $host $port 0 [expr {$j * 20}] [expr {($j +1)*20 }] ]
lappend load_handles $load_handle
}
after 10000
for {set j 0} {$j < 100} {incr j} {
set ele [lindex $load_handles $j]
stop_bg_complex_data $ele
}
# hget
for {set j 0} {$j < 100} {incr j} {
set load_handle [start_hash_hget $host $port 0 [expr {$j * 20}] [expr {($j +1)*20 }] ]
lappend load_handles $load_handle
}
after 10000
for {set j 0} {$j < 100} {incr j} {
set ele [lindex $load_handles $j]
stop_bg_complex_data $ele
}
}
Loading

0 comments on commit 94ddde9

Please sign in to comment.