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 deleting from s3 by ttl #13533

Merged
merged 6 commits into from
Jan 20, 2025
Merged

Conversation

zverevgeny
Copy link
Collaborator

Changelog category

  • Not for changelog (changelog entry is not required)

Copy link

github-actions bot commented Jan 19, 2025

2025-01-19 14:15:47 UTC Pre-commit check linux-x86_64-release-asan for 2e031bd has started.
2025-01-19 14:16:18 UTC Artifacts will be uploaded here
2025-01-19 14:18:40 UTC ya make is running...
🟢 2025-01-19 14:18:45 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-01-19 14:18:50 UTC Build successful.

Copy link

github-actions bot commented Jan 19, 2025

2025-01-19 14:17:16 UTC Pre-commit check linux-x86_64-relwithdebinfo for 2e031bd has started.
2025-01-19 14:17:27 UTC Artifacts will be uploaded here
2025-01-19 14:19:55 UTC ya make is running...
🟢 2025-01-19 14:20:00 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-01-19 14:20:05 UTC Build successful.

Copy link

github-actions bot commented Jan 20, 2025

2025-01-20 13:57:29 UTC Pre-commit check linux-x86_64-relwithdebinfo for d5df818 has started.
2025-01-20 13:57:41 UTC Artifacts will be uploaded here
2025-01-20 14:00:16 UTC ya make is running...
🟢 2025-01-20 14:00:22 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-01-20 14:00:28 UTC Build successful.

Copy link

github-actions bot commented Jan 20, 2025

2025-01-20 13:57:28 UTC Pre-commit check linux-x86_64-release-asan for d5df818 has started.
2025-01-20 13:57:41 UTC Artifacts will be uploaded here
2025-01-20 14:00:03 UTC ya make is running...
🟢 2025-01-20 14:00:14 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-01-20 14:00:21 UTC Build successful.

@zverevgeny zverevgeny marked this pull request as ready for review January 20, 2025 14:19
Copy link

github-actions bot commented Jan 20, 2025

2025-01-20 14:19:35 UTC Pre-commit check linux-x86_64-release-asan for b06e31f has started.
2025-01-20 14:19:41 UTC Artifacts will be uploaded here
2025-01-20 14:22:05 UTC ya make is running...
🟢 2025-01-20 14:22:11 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-01-20 14:22:17 UTC Build successful.

Copy link

github-actions bot commented Jan 20, 2025

2025-01-20 14:19:44 UTC Pre-commit check linux-x86_64-relwithdebinfo for b06e31f has started.
2025-01-20 14:19:55 UTC Artifacts will be uploaded here
2025-01-20 14:22:26 UTC ya make is running...
🟢 2025-01-20 14:22:32 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
0 0 0 0 0 0

🟢 2025-01-20 14:22:37 UTC Build successful.

Copy link

github-actions bot commented Jan 20, 2025

2025-01-20 14:26:09 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5607227 has started.
2025-01-20 14:26:20 UTC Artifacts will be uploaded here
2025-01-20 14:28:50 UTC ya make is running...
🟢 2025-01-20 14:34:22 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
7 7 0 0 0 0

🟢 2025-01-20 14:34:29 UTC Build successful.
🟢 2025-01-20 14:34:38 UTC ydbd size 2.1 GiB changed* by +34.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 04f4156 merge: 5607227 diff diff %
ydbd size 2 216 627 368 Bytes 2 216 662 904 Bytes +34.7 KiB +0.002%
ydbd stripped size 468 629 104 Bytes 468 635 152 Bytes +5.9 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 Jan 20, 2025

2025-01-20 14:26:09 UTC Pre-commit check linux-x86_64-release-asan for 5607227 has started.
2025-01-20 14:26:22 UTC Artifacts will be uploaded here
2025-01-20 14:28:46 UTC ya make is running...
🟢 2025-01-20 14:38:37 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5 5 0 0 0 0

🟢 2025-01-20 14:38:44 UTC Build successful.
🟢 2025-01-20 14:38:56 UTC ydbd size 3.6 GiB changed* by +72.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 04f4156 merge: 5607227 diff diff %
ydbd size 3 852 980 728 Bytes 3 853 055 320 Bytes +72.8 KiB +0.002%
ydbd stripped size 1 346 195 888 Bytes 1 346 223 856 Bytes +27.3 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

return {row["TierName"]: {"Portions": row["Portions"], "BlobSize": row["BlobSize"], "BlobCount": row["BlobCount"]} for result_set in results for row in result_set.rows}

def get_stat(self):
pass
Copy link
Collaborator

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.

удалил

def teardown_class(cls):
cls.ydb_client.stop()
cls.cluster.stop()
recipes_common.stop_daemon(cls.s3_pid)
Copy link
Collaborator

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.

поправил


@classmethod
def _setup_ydb(cls):
ydb_path = yatest.common.build_path(os.environ.get("YDB_DRIVER_BINARY", "ydb/apps/ydbd/ydbd"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Вот тут не имеет смысла дефолтное значение как будто

Потому что env задается прям на уровне ya.make

Ну либо я задумки ен понял

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

поправил

ydb_path = yatest.common.build_path(os.environ.get("YDB_DRIVER_BINARY", "ydb/apps/ydbd/ydbd"))
logger.info(yatest.common.execute([ydb_path, "-V"], wait=True).stdout.decode("utf-8"))
config = KikimrConfigGenerator(
erasure=Erasure.MIRROR_3_DC,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Вот тут аккуратнее: нужен ли тебе прям многонодный кластер? Если достаточно однонодного, то лучше однонодный, потому что много ресурсов на 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.

оставил дефолт

cold_bucket = "cold"
frozen_bucket = "frozen"
days_to_cool = 1000
days_to_froze = 3000
Copy link
Collaborator

Choose a reason for hiding this comment

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

days_to_freeze все таки наверное

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

поправил

logger = logging.getLogger(__name__)


class TestDeleteS3Ttl(TllTieringTestBase):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Я вот не уверен до конца что имеет смысл разбивать на два классе TllTieringTestBase/TestDeleteS3Ttl но смотри сам

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

предполагается переиспользование другими тестами тиринга

def get_row_count_by_date(self, table_path: str, past_days: int) -> int:
return self.ydb_client.query(f"SELECT count(*) as Rows from `{table_path}` WHERE ts < CurrentUtcTimestamp() - DateTime::IntervalFromDays({past_days})")[0].rows[0]["Rows"]

def test(self):
Copy link
Collaborator

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.

В докстринге к классу есть ссылка на описание

maximyurchuk
maximyurchuk previously approved these changes Jan 20, 2025
Copy link

github-actions bot commented Jan 20, 2025

2025-01-20 17:44:43 UTC Pre-commit check linux-x86_64-release-asan for cbc40d5 has started.
2025-01-20 17:44:54 UTC Artifacts will be uploaded here
2025-01-20 17:47:18 UTC ya make is running...
🟢 2025-01-20 18:14:57 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5 5 0 0 0 0

🟢 2025-01-20 18:15:08 UTC Build successful.
🟡 2025-01-20 18:15:20 UTC ydbd size 3.6 GiB changed* by +313.7 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: dbe9d9b merge: cbc40d5 diff diff %
ydbd size 3 853 083 840 Bytes 3 853 405 104 Bytes +313.7 KiB +0.008%
ydbd stripped size 1 346 233 456 Bytes 1 346 322 160 Bytes +86.6 KiB +0.007%

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

2025-01-20 17:46:03 UTC Pre-commit check linux-x86_64-relwithdebinfo for cbc40d5 has started.
2025-01-20 17:46:07 UTC Artifacts will be uploaded here
2025-01-20 17:48:30 UTC ya make is running...
🟢 2025-01-20 17:55:20 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
7 7 0 0 0 0

🟢 2025-01-20 17:55:26 UTC Build successful.
🟡 2025-01-20 17:55:35 UTC ydbd size 2.1 GiB changed* by +208.9 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: dbe9d9b merge: cbc40d5 diff diff %
ydbd size 2 216 675 360 Bytes 2 216 889 232 Bytes +208.9 KiB +0.010%
ydbd stripped size 468 634 832 Bytes 468 664 560 Bytes +29.0 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

@zverevgeny zverevgeny merged commit fdde655 into ydb-platform:main Jan 20, 2025
12 checks passed
the-ancient-1 pushed a commit to the-ancient-1/ydb that referenced this pull request Jan 21, 2025
azevaykin pushed a commit to azevaykin/ydb that referenced this pull request Feb 3, 2025
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 tiering. Functional. When configuring DELETE tier, data evaporates from S3
3 participants