From a0b925333b750fb96424382e4d280d0a5bc1fe4f Mon Sep 17 00:00:00 2001 From: Kirill Rysin Date: Fri, 20 Dec 2024 12:31:54 +0000 Subject: [PATCH 1/4] init --- .../scripts/analytics/upload_tests_results.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/scripts/analytics/upload_tests_results.py b/.github/scripts/analytics/upload_tests_results.py index b9a60f0577d6..100823fe94eb 100755 --- a/.github/scripts/analytics/upload_tests_results.py +++ b/.github/scripts/analytics/upload_tests_results.py @@ -218,9 +218,9 @@ def main(): test_results_file, build_type, job_name, job_id, commit, branch, pull, run_timestamp ) result_with_owners = get_codeowners_for_tests(codeowners, results) - prepared_for_update_rows = [] + prepared_for_upload_rows = [] for index, row in enumerate(result_with_owners): - prepared_for_update_rows.append({ + prepared_for_upload_rows.append({ 'branch': row['branch'], 'build_type': row['build_type'], 'commit': row['commit'], @@ -240,13 +240,18 @@ def main(): 'test_id': f"{row['pull']}_{row['run_timestamp']}_{index}", 'test_name': row['test_name'], }) - print(f'upserting runs: {len(prepared_for_update_rows)} rows') - if prepared_for_update_rows: - with ydb.SessionPool(driver) as pool: - create_tables(pool, test_table_name) - bulk_upsert(driver.table_client, full_path, - prepared_for_update_rows) - print('tests updated') + print(f'upserting runs: {len(prepared_for_upload_rows)} rows') + if prepared_for_upload_rows: + + batch_rows_for_upload_size = 1000 + for start in range(0, len(prepared_for_upload_rows), batch_rows_for_upload_size): + batch_rows_for_upload = prepared_for_upload_rows[start:start + batch_rows_for_upload_size] + with ydb.SessionPool(driver) as pool: + create_tables(pool, test_table_name) + bulk_upsert(driver.table_client, full_path, + batch_rows_for_upload) + + print('tests uploaded') else: print('nothing to upsert') From 66c8c666acbc4f3d54b7c87c4f067fe38d33032e Mon Sep 17 00:00:00 2001 From: Kirill Rysin Date: Fri, 20 Dec 2024 12:36:17 +0000 Subject: [PATCH 2/4] for rollback --- ydb/core/tx/columnshard/columnshard.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ydb/core/tx/columnshard/columnshard.cpp b/ydb/core/tx/columnshard/columnshard.cpp index f0782462de4d..d91f238ca242 100644 --- a/ydb/core/tx/columnshard/columnshard.cpp +++ b/ydb/core/tx/columnshard/columnshard.cpp @@ -239,6 +239,7 @@ void TColumnShard::Handle(TEvPrivate::TEvPeriodicWakeup::TPtr& ev, const TActorC AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "TEvPrivate::TEvPeriodicWakeup")("tablet_id", TabletID()); SendWaitPlanStep(GetOutdatedStep()); + SendPeriodicStats(); EnqueueBackgroundActivities(); ctx.Schedule(PeriodicWakeupActivationPeriod, new TEvPrivate::TEvPeriodicWakeup()); From 270275cf047af0151fcaf3f707bedde73d932043 Mon Sep 17 00:00:00 2001 From: Kirill Rysin Date: Mon, 23 Dec 2024 09:24:49 +0000 Subject: [PATCH 3/4] create table out of for --- .github/scripts/analytics/upload_tests_results.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/scripts/analytics/upload_tests_results.py b/.github/scripts/analytics/upload_tests_results.py index 100823fe94eb..2c0fdfbadd3c 100755 --- a/.github/scripts/analytics/upload_tests_results.py +++ b/.github/scripts/analytics/upload_tests_results.py @@ -242,18 +242,17 @@ def main(): }) print(f'upserting runs: {len(prepared_for_upload_rows)} rows') if prepared_for_upload_rows: - batch_rows_for_upload_size = 1000 - for start in range(0, len(prepared_for_upload_rows), batch_rows_for_upload_size): - batch_rows_for_upload = prepared_for_upload_rows[start:start + batch_rows_for_upload_size] - with ydb.SessionPool(driver) as pool: - create_tables(pool, test_table_name) + with ydb.SessionPool(driver) as pool: + create_tables(pool, test_table_name) + for start in range(0, len(prepared_for_upload_rows), batch_rows_for_upload_size): + batch_rows_for_upload = prepared_for_upload_rows[start:start + batch_rows_for_upload_size] bulk_upsert(driver.table_client, full_path, batch_rows_for_upload) print('tests uploaded') else: - print('nothing to upsert') + print('nothing to upload') From 345c58f50a67380742079e7449be9a4d7e79c8b5 Mon Sep 17 00:00:00 2001 From: Kirill Rysin Date: Mon, 23 Dec 2024 11:10:33 +0000 Subject: [PATCH 4/4] rollback --- ydb/core/tx/columnshard/columnshard.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ydb/core/tx/columnshard/columnshard.cpp b/ydb/core/tx/columnshard/columnshard.cpp index d91f238ca242..f0782462de4d 100644 --- a/ydb/core/tx/columnshard/columnshard.cpp +++ b/ydb/core/tx/columnshard/columnshard.cpp @@ -239,7 +239,6 @@ void TColumnShard::Handle(TEvPrivate::TEvPeriodicWakeup::TPtr& ev, const TActorC AFL_DEBUG(NKikimrServices::TX_COLUMNSHARD)("event", "TEvPrivate::TEvPeriodicWakeup")("tablet_id", TabletID()); SendWaitPlanStep(GetOutdatedStep()); - SendPeriodicStats(); EnqueueBackgroundActivities(); ctx.Schedule(PeriodicWakeupActivationPeriod, new TEvPrivate::TEvPeriodicWakeup());