apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.18k stars 1.29k forks source link

Add client metric test #11480

Open hfu94 opened 6 days ago

hfu94 commented 6 days ago

This restarting test start with 7.1 version and setup the sample rate for transaction log, then it test with 7.3 version and verify transaction log are still being written.

This change can only be merged after knowing which release in 7.1 has ClientMetric workload, and the first phase of restarting test needs to run with at least that version.

manual test: phase 1:

../bin_fdbserver/fdbserver.7.1.test  -r simulation -f ~/src/foundationdb/tests/restarting/from_7.1.0_until_7.2.0/ClientMetricRestart-1.toml 
........
Change globalconfig: sampleRate=1 sizeLimit=177654
running test (ClientMetricRestartTest)...
writeRandomKeys finish, written=2
Read from globalconfig: sampleRate=1.000000 sizeLimit=177654
VersionStamp is 250271984
vs1=250271984
writeRandomKeys finish, written=2
Read from globalconfig: sampleRate=1.000000 sizeLimit=177654
VersionStamp is 260311890
vs2=260311890
ClientMetric;RandomClogging;SaveAndKillWorkload complete
Unseed: 69555
Elapsed: 254.918667 simsec, 3.794163 real seconds

phase 2:


../bin_fdbserver/fdbserver.7.3.test --restarting -r simulation -f ~/src/foundationdb/tests/restarting/from_7.1.0_until_7.2.0/ClientMetricRestart-2.toml 
.......
Read from globalconfig: rate=1.000000 size=177654
Read from globalconfig: rate=default size=default
VersionStamp is 728401758
vs1=728401758
writeRandomKeys finish, written=4
Read from globalconfig: rate=1.000000 size=177654
VersionStamp is 837261418
vs2=837261418
ClientMetric;RandomClogging complete
ClientMetricRestartTest complete
checking test (ClientMetricRestartTest)...
fetching metrics (ClientMetricRestartTest)...
setting up test (ConsistencyCheck)...
Test received trigger for setup...
Test received trigger for setup...
Test received trigger for setup...
Test received trigger for setup...
Set perpetual_storage_wiggle=0 ...
Set perpetual_storage_wiggle=0 Done.
running test (ConsistencyCheck)...
ConsistencyCheck complete
ConsistencyCheck complete
ConsistencyCheck complete
ConsistencyCheck complete
ConsistencyCheck complete
checking test (ConsistencyCheck)...
fetching metrics (ConsistencyCheck)...
4 test clients passed; 0 test clients failed
Run test:ClientMetricRestartTest Done.

1 tests passed; 0 tests failed.
Waiting for DD to end...
Set perpetual_storage_wiggle=0 ...
Set perpetual_storage_wiggle=0 Done.

Unseed: 89129
Elapsed: 652.220458 simsec, 10.027366 real seconds

# Code-Reviewer Section

The general pull request guidelines can be found [here](https://github.com/apple/foundationdb/wiki/FoundationDB-Commit-Process).

Please check each of the following things and check *all* boxes before accepting a PR.

- [ ] The PR has a description, explaining both the problem and the solution.
- [ ] The description mentions which forms of testing were done and the testing seems reasonable.
- [ ] Every function/class/actor that was touched is reasonably well documented.

## For Release-Branches

If this PR is made against a release-branch, please also check the following:

- [ ] This change/bugfix is a cherry-pick from the next younger branch (younger `release-branch` or `main` if this is the youngest branch)
- [ ] There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)
foundationdb-ci commented 5 days ago

Result of foundationdb-pr-clang on Linux CentOS 7

foundationdb-ci commented 5 days ago

Result of foundationdb-pr on Linux CentOS 7

foundationdb-ci commented 5 days ago

Result of foundationdb-pr-clang-arm on Linux CentOS 7

foundationdb-ci commented 5 days ago

Result of foundationdb-pr-cluster-tests on Linux CentOS 7