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

Test log scenario 1 #16018

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

Conversation

Emgariko
Copy link
Collaborator

Changelog entry

Test #13530

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

Copy link

🟢 2025-03-20 13:36:18 UTC The validation of the Pull Request description is successful.

@Emgariko Emgariko force-pushed the test_log_scenario_1 branch 2 times, most recently from 3a0ce28 to ddbac88 Compare March 20, 2025 16:26
@Emgariko Emgariko force-pushed the test_log_scenario_1 branch from ddbac88 to 237881b Compare March 20, 2025 16:31
Copy link

github-actions bot commented Mar 20, 2025

2025-03-20 16:32:54 UTC Pre-commit check linux-x86_64-relwithdebinfo for 2498cd9 has started.
2025-03-20 16:33:09 UTC Artifacts will be uploaded here
2025-03-20 16:35:32 UTC ya make is running...
🟡 2025-03-20 17:12:34 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?
72 67 0 2 0 3

2025-03-20 17:12:45 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-03-20 17:20:52 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?
6 (only retried tests) 4 0 2 0 0

2025-03-20 17:21:02 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-03-20 17:21:55 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?
4 (only retried tests) 2 0 2 0 0

🟢 2025-03-20 17:22:02 UTC Build successful.
🟡 2025-03-20 17:22:13 UTC ydbd size 2.2 GiB changed* by +200.1 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 00995cf merge: 2498cd9 diff diff %
ydbd size 2 313 317 144 Bytes 2 313 522 032 Bytes +200.1 KiB +0.009%
ydbd stripped size 484 266 592 Bytes 484 306 336 Bytes +38.8 KiB +0.008%

*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 Mar 20, 2025

2025-03-20 16:33:07 UTC Pre-commit check linux-x86_64-release-asan for 2498cd9 has started.
2025-03-20 16:33:23 UTC Artifacts will be uploaded here
2025-03-20 16:35:34 UTC ya make is running...
🟡 2025-03-20 17:10:00 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?
58 50 0 3 0 5

2025-03-20 17:10:11 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-03-20 17:21:01 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?
10 (only retried tests) 6 0 3 0 1

2025-03-20 17:21:09 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-03-20 17:28:55 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?
8 (only retried tests) 4 0 3 0 1

🟢 2025-03-20 17:29:02 UTC Build successful.
🟡 2025-03-20 17:29:18 UTC ydbd size 3.8 GiB changed* by +422.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 00995cf merge: 2498cd9 diff diff %
ydbd size 4 071 958 816 Bytes 4 072 391 744 Bytes +422.8 KiB +0.011%
ydbd stripped size 1 408 718 408 Bytes 1 408 860 488 Bytes +138.8 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

@Emgariko Emgariko linked an issue Mar 20, 2025 that may be closed by this pull request
Comment on lines +19 to +79
class S3Client:
def __init__(self, endpoint, region, key_id, key_secret):
self.endpoint = endpoint
self.region = region
self.key_id = key_id
self.key_secret = key_secret

session = boto3.session.Session()
self.s3 = session.resource(
service_name="s3",
aws_access_key_id=key_id,
aws_secret_access_key=key_secret,
region_name=region,
endpoint_url=endpoint
)
self.client = session.client(
service_name="s3",
aws_access_key_id=key_id,
aws_secret_access_key=key_secret,
region_name=region,
endpoint_url=endpoint
)

def create_bucket(self, name: str):
self.client.create_bucket(Bucket=name)

def get_bucket_stat(self, bucket_name: str) -> (int, int):
bucket = self.s3.Bucket(bucket_name)
count = 0
size = 0
for obj in bucket.objects.all():
count += 1
size += obj.size
return (count, size)


class ColumnTableHelper:
def __init__(self, ydb_client: YdbClient, path: str):
self.ydb_client = ydb_client
self.path = path

def get_row_count(self) -> int:
return self.ydb_client.query(f"select count(*) as Rows from `{self.path}`")[0].rows[0]["Rows"]

def get_portion_count(self) -> int:
return self.ydb_client.query(f"select count(*) as Rows from `{self.path}/.sys/primary_index_portion_stats`")[0].rows[0]["Rows"]

def get_portion_stat_by_tier(self) -> dict[str, dict[str, int]]:
results = self.ydb_client.query(f"select TierName, sum(Rows) as Rows, count(*) as Portions from `{self.path}/.sys/primary_index_portion_stats` group by TierName")
return {row["TierName"]: {"Rows": row["Rows"], "Portions": row["Portions"]} for result_set in results for row in result_set.rows}

def get_blob_stat_by_tier(self) -> dict[str, (int, int)]:
stmt = f"""
select TierName, count(*) as Portions, sum(BlobSize) as BlobSize, sum(BlobCount) as BlobCount from (
select TabletId, PortionId, TierName, sum(BlobRangeSize) as BlobSize, count(*) as BlobCount from `{self.path}/.sys/primary_index_stats` group by TabletId, PortionId, TierName
) group by TierName
"""
results = self.ydb_client.query(stmt)
return {row["TierName"]: {"Portions": row["Portions"], "BlobSize": row["BlobSize"], "BlobCount": row["BlobCount"]} for result_set in results for row in result_set.rows}


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
Collaborator Author

Choose a reason for hiding this comment

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

Попробую удалить

@Emgariko
Copy link
Collaborator Author

План был такой:
1 перенести тест в ydb/tests/olap/scenario - будет в следующем PR-е с косметическими правками
2 добавить запрос на чтение на часовом интервале - DONE
3 проверить что exception правильно будут хендлится и тест завершится с ошибкой - DONE, проверил
4 переписать TestBaseSet по аналогии с тестами из ydb/tests/olap/scenario. Тут сейчас есть проблема. - будет в след ПР-е
5 добавить параметр --timestamp_deviation 180 - OK

Comment on lines 11 to 14
REQUIREMENTS(ram:25)

SIZE(LARGE)
TAG(ya:fat)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ram поднял потому что при прогоне на дев машинке превышался лимит.

LARGE сделал потому что прогон занимает 600+ секунд

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Поменяю параметры теста чтобы прогон был быстрее. Тогда оставлю Medium

@Emgariko
Copy link
Collaborator Author

В тесте стреляет ошибка #16034 и #16043

Copy link

github-actions bot commented Mar 21, 2025

2025-03-21 09:43:38 UTC Pre-commit check linux-x86_64-relwithdebinfo for 324e3ec has started.
2025-03-21 09:43:54 UTC Artifacts will be uploaded here
2025-03-21 09:46:16 UTC ya make is running...
🟡 2025-03-21 09:59:56 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?
83 64 0 3 6 10

2025-03-21 10:00:04 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-03-21 10:17:34 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?
22 (only retried tests) 10 0 3 1 8

2025-03-21 10:17:46 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-03-21 10:30:47 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?
15 (only retried tests) 3 0 4 1 7

🟢 2025-03-21 10:30:57 UTC Build successful.
🟡 2025-03-21 10:31:10 UTC ydbd size 2.2 GiB changed* by +524.6 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 6261c52 merge: 324e3ec diff diff %
ydbd size 2 313 762 408 Bytes 2 314 299 592 Bytes +524.6 KiB +0.023%
ydbd stripped size 484 329 248 Bytes 484 354 432 Bytes +24.6 KiB +0.005%

*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 Mar 21, 2025

2025-03-21 09:46:02 UTC Pre-commit check linux-x86_64-release-asan for 324e3ec has started.
2025-03-21 09:46:17 UTC Artifacts will be uploaded here
2025-03-21 09:48:35 UTC ya make is running...
🟡 2025-03-21 10:02:49 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?
65 49 0 4 2 10

2025-03-21 10:02:59 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-03-21 10:17:34 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?
20 (only retried tests) 6 0 4 1 9

2025-03-21 10:17:46 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-03-21 10:29:14 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?
19 (only retried tests) 6 0 4 0 9

🟢 2025-03-21 10:29:24 UTC Build successful.
🟡 2025-03-21 10:29:41 UTC ydbd size 3.8 GiB changed* by +951.2 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 5f13bfb merge: 324e3ec diff diff %
ydbd size 4 072 829 160 Bytes 4 073 803 184 Bytes +951.2 KiB +0.024%
ydbd stripped size 1 408 946 216 Bytes 1 409 028 904 Bytes +80.8 KiB +0.006%

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

@Emgariko
Copy link
Collaborator Author

Нужно будет размьютить тест

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.

Test cs read-write. Log scenario (write in the end)
1 participant