Skip to content

Test read write cs (Log scenario, random writes) #16999

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Emgariko
Copy link
Collaborator

@Emgariko Emgariko commented Apr 9, 2025

Changelog entry

Implementing #13531

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

Added date_from & date_to params to ydb workload log to support uniformly distributed timestamp generation. And implemented test for random writes scenario.

Copy link

github-actions bot commented Apr 9, 2025

🟢 2025-04-09 14:35:35 UTC The validation of the Pull Request description is successful.

@@ -252,6 +253,11 @@ class TRandomLogGenerator {
return result.str();
}

TInstant UniformInstant(ui64 from, ui64 to) const {
TMersenne<ui64> rnd;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

локально проверил - если сид не передавать, то всегда одинаковые числа будут генериться.

@Emgariko Emgariko force-pushed the test_log_scenario_random_writes branch from 208c01a to 61fb45b Compare April 9, 2025 17:20
Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 17:21:53 UTC Pre-commit check linux-x86_64-relwithdebinfo for a7bd661 has started.
2025-04-09 17:22:20 UTC Artifacts will be uploaded here
2025-04-09 17:22:49 UTC Check cancelled

@Emgariko Emgariko force-pushed the test_log_scenario_random_writes branch from 61fb45b to c58a8e9 Compare April 9, 2025 17:22
Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 17:24:11 UTC Pre-commit check linux-x86_64-release-asan for 5cfd766 has started.
2025-04-09 17:24:27 UTC Artifacts will be uploaded here
2025-04-09 17:26:46 UTC ya make is running...
🟡 2025-04-09 17:47:52 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
645 604 0 4 25 12

2025-04-09 17:48:03 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-04-09 18:01:46 UTC ydbd size 3.9 GiB changed* by -96 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 6853d24 merge: 5cfd766 diff diff %
ydbd size 4 136 601 624 Bytes 4 136 601 528 Bytes -96 Bytes -0.000%
ydbd stripped size 1 428 737 224 Bytes 1 428 737 160 Bytes -64 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-04-09 18:01:47 UTC Check cancelled

Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 17:29:30 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5cfd766 has started.
2025-04-09 17:29:46 UTC Artifacts will be uploaded here
2025-04-09 17:32:06 UTC ya make is running...
🟢 2025-04-09 17:55:18 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1095 1077 0 0 7 11

🟢 2025-04-09 17:55:31 UTC Build successful.
🟢 2025-04-09 17:55:42 UTC ydbd size 2.2 GiB changed* by +4.0 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 6853d24 merge: 5cfd766 diff diff %
ydbd size 2 357 628 864 Bytes 2 357 632 960 Bytes +4.0 KiB +0.000%
ydbd stripped size 492 806 944 Bytes 492 811 040 Bytes +4.0 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 18:03:42 UTC Pre-commit check linux-x86_64-relwithdebinfo for d2d2cbc has started.
2025-04-09 18:04:02 UTC Artifacts will be uploaded here
2025-04-09 18:06:50 UTC ya make is running...
2025-04-09 18:18:47 UTC Check cancelled

Comment on lines +33 to +50
if timestamp_deviation is not None:
if date_from is not None:
raise TypeError("timestamp_deviation and uniform PK mode should be applied mutual exclusively")
if date_to is not None:
raise TypeError("timestamp_deviation and uniform PK mode should be applied mutual exclusively")
self.timestamp_deviation = timestamp_deviation
self.pk_mode = YdbWorkloadLog.PKMode.TIMESTAMP_DEVIATION
else:
if date_from is not None:
if timestamp_deviation is not None:
raise TypeError("timestamp_deviation and uniform PK mode should be applied mutual exclusively")
if date_to is None:
raise TypeError("missing date_to")
self.date_from = date_from
self.date_to = date_to
self.pk_mode = YdbWorkloadLog.PKMode.UNIFORM
else:
raise TypeError("missing date_from")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Уродливо получилось, надо поправить

Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 18:07:57 UTC Pre-commit check linux-x86_64-release-asan for d2d2cbc has started.
2025-04-09 18:08:12 UTC Artifacts will be uploaded here
2025-04-09 18:10:25 UTC ya make is running...
2025-04-09 18:18:48 UTC Check cancelled

@Emgariko Emgariko force-pushed the test_log_scenario_random_writes branch from 79b23db to b9b5771 Compare April 9, 2025 18:18
Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 18:20:44 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1ae1b1b has started.
2025-04-09 18:20:53 UTC Artifacts will be uploaded here
2025-04-09 18:23:11 UTC ya make is running...
🟡 2025-04-09 18:47:37 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1096 1082 0 4 3 7

2025-04-09 18:47:51 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-09 18:59:24 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
18 (only retried tests) 11 0 2 0 5

2025-04-09 18:59:32 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-04-09 19:07:20 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
12 (only retried tests) 7 0 1 0 4

🟢 2025-04-09 19:07:28 UTC Build successful.
🟢 2025-04-09 19:07:43 UTC ydbd size 2.2 GiB changed* by +4.0 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 6853d24 merge: 1ae1b1b diff diff %
ydbd size 2 357 628 864 Bytes 2 357 632 960 Bytes +4.0 KiB +0.000%
ydbd stripped size 492 806 944 Bytes 492 811 040 Bytes +4.0 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 9, 2025

2025-04-09 18:22:22 UTC Pre-commit check linux-x86_64-release-asan for 1ae1b1b has started.
2025-04-09 18:22:37 UTC Artifacts will be uploaded here
2025-04-09 18:24:50 UTC ya make is running...
🟡 2025-04-09 18:47:23 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
645 624 0 5 5 11

2025-04-09 18:47:35 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-09 18:58:51 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
23 (only retried tests) 8 0 3 4 8

2025-04-09 18:59:02 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-09 19:13:18 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
16 (only retried tests) 6 0 2 1 7

🟢 2025-04-09 19:13:24 UTC Build successful.
🟢 2025-04-09 19:13:40 UTC ydbd size 3.9 GiB changed* by -96 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 6853d24 merge: 1ae1b1b diff diff %
ydbd size 4 136 601 624 Bytes 4 136 601 528 Bytes -96 Bytes -0.000%
ydbd stripped size 1 428 737 224 Bytes 1 428 737 160 Bytes -64 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@@ -153,3 +184,35 @@ def test(self, timestamp_deviation: int):

for thread in threads:
thread.join()

def test_log_uniform(self):
Copy link
Collaborator Author

@Emgariko Emgariko Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

При локальном прогоне тест TestLogScenario(содержащий в себе 3 теста - test_log_deviation с двумя pytest-параметрами + test_log_uniform) почему-то считает общее время для этих трех тестов. Время превыщает 600 секунд и падает по таймауту.

Ограничение по памяти тоже превышается. Вероятно по этой же причине.
Скорее всего тесты надо разделить или как-то поправить конфигурацию, чтобы считалось не суммарное время 3х тестов, а каждого независимо.

ydb/tests/olap <py3test> [size:medium]
│------ sole chunk ran 3 tests (total:621.35s - test:600.04s)
│Chunk exceeded 600s timeout and was killed
│List of the tests involved in the launch:
│test_log_scenario.py::TestLogScenario::test_log_deviation[1051200] (good) duration: 282.46s
│test_log_scenario.py::TestLogScenario::test_log_uniform (timeout) duration: 212.66s
│test_log_scenario.py::TestLogScenario::test_log_deviation[180] (good) duration: 121.21s
│Info: Test run has exceeded 9.0G (9437184K) memory limit with 14.0G (14646960K) used. This may lead to test failure on the Autocheck/CI

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Попробую покопать в сторону FORK_SUBTESTS().

Смущает, что эта опция применяется для всех тестов в директории. Но должна решить мою проблему.

Copy link

github-actions bot commented Apr 10, 2025

2025-04-10 09:16:25 UTC Pre-commit check linux-x86_64-release-asan for 0af9f5c has started.
2025-04-10 09:16:31 UTC Artifacts will be uploaded here
2025-04-10 09:18:52 UTC ya make is running...
🟡 2025-04-10 09:42:52 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
645 612 0 6 15 12

2025-04-10 09:43:06 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-10 09:54:24 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
35 (only retried tests) 19 0 4 4 8

2025-04-10 09:54:33 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-10 10:06:15 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
18 (only retried tests) 6 0 4 1 7

🟢 2025-04-10 10:06:23 UTC Build successful.
🟡 2025-04-10 10:06:40 UTC ydbd size 3.9 GiB changed* by +405.6 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 1167609 merge: 0af9f5c diff diff %
ydbd size 4 136 606 216 Bytes 4 137 021 568 Bytes +405.6 KiB +0.010%
ydbd stripped size 1 428 738 568 Bytes 1 428 885 704 Bytes +143.7 KiB +0.010%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 10, 2025

2025-04-10 09:19:02 UTC Pre-commit check linux-x86_64-relwithdebinfo for 0af9f5c has started.
2025-04-10 09:19:06 UTC Artifacts will be uploaded here
2025-04-10 09:21:26 UTC ya make is running...
🟡 2025-04-10 09:44:13 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1096 1086 0 1 2 7

2025-04-10 09:44:32 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-10 09:53:37 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13 (only retried tests) 8 0 1 0 4

2025-04-10 09:53:45 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-04-10 10:00:50 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
10 (only retried tests) 5 0 1 0 4

🟢 2025-04-10 10:00:57 UTC Build successful.
🟡 2025-04-10 10:01:09 UTC ydbd size 2.2 GiB changed* by +189.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: e1ad79a merge: 0af9f5c diff diff %
ydbd size 2 357 629 600 Bytes 2 357 823 936 Bytes +189.8 KiB +0.008%
ydbd stripped size 492 807 072 Bytes 492 814 880 Bytes +7.6 KiB +0.002%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 10, 2025

2025-04-10 10:39:20 UTC Pre-commit check linux-x86_64-relwithdebinfo for 45e1077 has started.
2025-04-10 10:39:53 UTC Artifacts will be uploaded here
2025-04-10 10:42:53 UTC ya make is running...
🟢 2025-04-10 11:06:18 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1099 1086 0 0 4 9

🟢 2025-04-10 11:06:29 UTC Build successful.
🟢 2025-04-10 11:06:40 UTC ydbd size 2.2 GiB changed* by +8.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: cbbff2d merge: 45e1077 diff diff %
ydbd size 2 357 823 936 Bytes 2 357 832 672 Bytes +8.5 KiB +0.000%
ydbd stripped size 492 814 880 Bytes 492 816 416 Bytes +1.5 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

Copy link

github-actions bot commented Apr 10, 2025

2025-04-10 10:40:19 UTC Pre-commit check linux-x86_64-release-asan for 45e1077 has started.
2025-04-10 10:40:53 UTC Artifacts will be uploaded here
2025-04-10 10:44:00 UTC ya make is running...
🟡 2025-04-10 11:07:27 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
645 614 0 5 16 10

2025-04-10 11:07:38 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-10 11:22:31 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
32 (only retried tests) 18 0 3 1 10

2025-04-10 11:22:40 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-10 11:34:10 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15 (only retried tests) 2 0 3 2 8

🟢 2025-04-10 11:34:17 UTC Build successful.
🟢 2025-04-10 11:34:35 UTC ydbd size 3.9 GiB changed* by +13.5 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: cbbff2d merge: 45e1077 diff diff %
ydbd size 4 137 021 664 Bytes 4 137 035 504 Bytes +13.5 KiB +0.000%
ydbd stripped size 1 428 885 768 Bytes 1 428 888 008 Bytes +2.2 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

"timestamp uniformly from specified interval. Presents as seconds since epoch. Once this option passed, 'date-from' "
"should be passed as well. This option is mutually exclusive with 'timestamp_deviation'")
.Optional().StoreResult(&TimestampDateTo);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MutuallyExclusive на timestamp_deviation и date_{to, from} потерял когда мержил конфликты.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant