Skip to content

Commit 23e6db9

Browse files
authored
fix: regtest failures (#5013)
1. Fix a crash bug in RESETSTAT when number of shards is less than number of threads. 2. Tune regtests parameters for pipelining tests to pass. Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1 parent aa7e8ab commit 23e6db9

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/regression-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ jobs:
5555
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
5656
aws-secret-access-key: ${{ secrets.AWS_S3_ACCESS_SECRET }}
5757
s3-bucket: ${{ secrets.S3_REGTEST_BUCKET }}
58-
# Chain ternary oprator of the form (which can be nested)
59-
# (expression == condition && <true expression> || <false expression>)
60-
epoll: ${{ matrix.proactor == 'Epoll' && 'epoll' || 'iouring' }}
6158

6259
- name: Upload logs on failure
6360
if: failure()

src/server/server_family.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2224,7 +2224,10 @@ void ServerFamily::ResetStat(Namespace* ns) {
22242224
shard_set->pool()->AwaitBrief(
22252225
[registry = service_.mutable_registry(), ns](unsigned index, auto*) {
22262226
registry->ResetCallStats(index);
2227-
ns->GetCurrentDbSlice().ResetEvents();
2227+
EngineShard* shard = EngineShard::tlocal();
2228+
if (shard) {
2229+
ns->GetDbSlice(shard->shard_id()).ResetEvents();
2230+
}
22282231
facade::ResetStats();
22292232
ServerState::tlocal()->exec_freq_count.clear();
22302233
});

tests/dragonfly/connection_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ async def test_keyspace_events_config_set(async_client: aioredis.Redis):
525525
await collect_expiring_events(pclient, keys)
526526

527527

528-
@pytest.mark.exclude_epoll
528+
@dfly_args({"max_busy_read_usec": 10000})
529529
async def test_reply_count(async_client: aioredis.Redis):
530530
"""Make sure reply aggregations reduce reply counts for common cases"""
531531

@@ -537,6 +537,7 @@ async def measure(aw):
537537
await aw
538538
return await get_reply_count() - before - 1
539539

540+
await async_client.config_resetstat()
540541
base = await get_reply_count()
541542
info_diff = await get_reply_count() - base
542543
assert info_diff == 1
@@ -1121,12 +1122,13 @@ async def wait_for_stuck_on_send():
11211122

11221123

11231124
# Test that the cache pipeline does not grow or shrink under constant pipeline load.
1124-
@dfly_args({"proactor_threads": 1, "pipeline_squash": 9, "max_busy_read_usec": 1000})
1125+
@dfly_args({"proactor_threads": 1, "pipeline_squash": 9, "max_busy_read_usec": 10000})
11251126
async def test_pipeline_cache_only_async_squashed_dispatches(df_factory):
11261127
server = df_factory.create()
11271128
server.start()
11281129

11291130
client = server.client()
1131+
await client.ping() # Make sure the connection and the protocol were established
11301132

11311133
async def push_pipeline(size):
11321134
p = client.pipeline(transaction=True)

0 commit comments

Comments
 (0)