Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic micro-testing #5164

Closed
7 of 15 tasks
neverchanje opened this issue Sep 7, 2022 · 5 comments
Closed
7 of 15 tasks

Automatic micro-testing #5164

neverchanje opened this issue Sep 7, 2022 · 5 comments
Assignees
Labels
type/tracking Tracking issue.

Comments

@neverchanje
Copy link
Contributor

neverchanje commented Sep 7, 2022

As we are heading toward delivering a production-ready database, the micro testing frameworks can be used to ensure that we have covered as many cases as possible. In the meantime, we will conduct manual testing (or "stress testing") and observe the key metrics when processing several selected queries in order to ensure that the system does not behave unexpectedly, such as OOM, under a relatively high level of load. Yet, the manual testing steps are not the topic of this issue.

Source micro-testing framework

Source reading/parsing

The parsing part will be more deterministic than the rest. We need to generate random data in a specific format (with a probability of generating false data, the expected behavior is to drop it) and verify the correctness of the parsed output.

Failover

In this test, we need to ensure that RisingWave can achieve at-least-once delivery. There must be no data loss or wrong data ordering. The program will include a Meta and a simplified CN, which only runs a wrapped SourceExecutor that consumes the upstream and checks the data ordering. When the CN receives a periodic barrier, it flushes its state to ensure that no data older than the checkpointed offset has been consumed. Also, there shouldn’t be a hole (gap) between the consumed data and the new incoming data. The checking can be implemented as debug_assert, which can be turned off on production (or enabled if necessary).

The simplified CN will be killed periodically, like for 30s at a time. We can run the testing daily, each for 1h.

SQL testing

Hummock testing

Compaction / Vacuum

We will conduct four types of test to improve compaction/vacuum coverage:

Read-path

The testing can be covered by batch-query testing.

Batch-query testing

The motivation is to verify the query correctness and the stability of the query path while querying a large dataset.

The approach is to first generate the dataset via tpch and ch-benchmark and load the data into both Postgres and RisingWave. The Postgres is used as a source of truth. We will then perform different queries and compare the query results of both databases.

Streaming testing

Deterministic testing

By the end of 9/30, we will heavily rely on MadSim for testing the streaming execution since it’s currently the most effective way to achieve high coverage. The development plan:

Sink testing

TBD

@neverchanje neverchanje added the type/tracking Tracking issue. label Sep 7, 2022
@github-actions github-actions bot added this to the release-0.1.13 milestone Sep 7, 2022
@neverchanje neverchanje self-assigned this Sep 7, 2022
@neverchanje neverchanje pinned this issue Sep 7, 2022
@fuyufjh fuyufjh removed this from the release-0.1.14 milestone Nov 23, 2022
@fuyufjh
Copy link
Member

fuyufjh commented Dec 30, 2022

Hi @neverchanje Any updates or future plan on this? It has been silent for a few months and I am considering to close it...

@neverchanje
Copy link
Contributor Author

neverchanje commented Jan 17, 2023

Checked through the items two weeks ago with @wangrunji0408 I think this issue is now blocked by #5161 and #5170 . Once it's done, we can close this issue and track other issues separately.

@neverchanje
Copy link
Contributor Author

neverchanje commented Jan 17, 2023

I've re-assigned this issue to @wangrunji0408. Please decide whether to close this issue and the depending issues if you think they add little value to our QA process. Personally, I think both the simulated s3 and the random killer can greatly help us ensure stability under extreme situations.

@wangrunji0408
Copy link
Contributor

Okay. The S3 simulator is under final review and integration. madsim-rs/madsim#107. Will close this issue when it is done.

@wangrunji0408
Copy link
Contributor

I'm closing this issue as the main work on simulation testing is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/tracking Tracking issue.
Projects
None yet
Development

No branches or pull requests

3 participants