Skip to content

Add Arena option to BulkUpsert, add hidden --send-format option #20005

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 9 commits into
base: main
Choose a base branch
from

Conversation

pnv1
Copy link
Collaborator

@pnv1 pnv1 commented Jun 21, 2025

Changelog entry

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

@pnv1 pnv1 requested review from a team as code owners June 21, 2025 17:35
Copy link

🟢 2025-06-21 17:38:42 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Jun 21, 2025

2025-06-21 17:39:17 UTC Pre-commit check linux-x86_64-release-asan for 9afa6cc has started.
2025-06-21 17:39:29 UTC Artifacts will be uploaded here
2025-06-21 17:43:06 UTC ya make is running...
🟡 2025-06-21 19:56:11 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?
16151 15812 0 117 190 32

2025-06-21 19:57:40 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-21 20:46:33 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?
1870 (only retried tests) 1602 0 60 180 28

2025-06-21 20:46:52 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-06-21 21:21:17 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?
1730 (only retried tests) 1467 0 58 177 28

🟢 2025-06-21 21:21:34 UTC Build successful.
🔴 2025-06-21 21:22:09 UTC ydbd size 3.9 GiB changed* by +3.4 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: 2426162 merge: 9afa6cc diff diff %
ydbd size 4 185 147 976 Bytes 4 188 711 864 Bytes +3.4 MiB +0.085%
ydbd stripped size 1 450 982 744 Bytes 1 452 439 960 Bytes +1.4 MiB +0.100%

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

2025-06-21 17:39:17 UTC Pre-commit check linux-x86_64-relwithdebinfo for 9afa6cc has started.
2025-06-21 17:39:28 UTC Artifacts will be uploaded here
2025-06-21 17:42:54 UTC ya make is running...

@pnv1 pnv1 added the rebase-and-check Rebase PR with the current base branch and check label Jun 22, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Jun 22, 2025
Copy link

github-actions bot commented Jun 22, 2025

2025-06-22 18:09:10 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7e76beb has started.
2025-06-22 18:09:21 UTC Artifacts will be uploaded here
2025-06-22 18:12:52 UTC ya make is running...
🟡 2025-06-22 19:21:41 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?
38414 35695 0 7 2663 49

2025-06-22 19:24:58 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-22 19:42:14 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?
500 (only retried tests) 472 0 1 0 27

2025-06-22 19:42:23 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-06-22 19:53:06 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
290 (only retried tests) 264 0 0 0 26

🟢 2025-06-22 19:53:14 UTC Build successful.
🟡 2025-06-22 19:53:35 UTC ydbd size 2.2 GiB changed* by +1.6 MiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 4b5dfba merge: 7e76beb diff diff %
ydbd size 2 378 943 848 Bytes 2 380 595 112 Bytes +1.6 MiB +0.069%
ydbd stripped size 498 353 128 Bytes 498 575 144 Bytes +216.8 KiB +0.045%

*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 Jun 22, 2025

2025-06-22 18:09:43 UTC Pre-commit check linux-x86_64-release-asan for 7e76beb has started.
2025-06-22 18:09:54 UTC Artifacts will be uploaded here
2025-06-22 18:13:25 UTC ya make is running...
🟡 2025-06-22 19:55: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?
16151 15841 0 93 192 25

2025-06-22 19:56:23 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-22 20:35: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 | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
2082 (only retried tests) 1781 0 91 186 24

2025-06-22 20:35:43 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-06-22 21:14:09 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?
1701 (only retried tests) 1427 0 70 178 26

🟢 2025-06-22 21:14:25 UTC Build successful.
🔴 2025-06-22 21:15:03 UTC ydbd size 3.9 GiB changed* by +3.4 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: 4b5dfba merge: 7e76beb diff diff %
ydbd size 4 185 149 944 Bytes 4 188 713 832 Bytes +3.4 MiB +0.085%
ydbd stripped size 1 450 983 192 Bytes 1 452 440 408 Bytes +1.4 MiB +0.100%

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

@@ -28,6 +28,7 @@ class TType {

const Ydb::Type& GetProto() const;
Ydb::Type& GetProto();
Ydb::Type&& ExtractProto() &&;
Copy link
Collaborator

Choose a reason for hiding this comment

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

А зачем отдельный метод ExtractProto, если можно сделать std::move(GetProto())?

@@ -1162,6 +1162,8 @@ struct TBulkUpsertSettings : public TOperationRequestSettings<TBulkUpsertSetting
// Format setting proto serialized into string. If not set format defaults are used.
// I.e. it's Ydb.Table.CsvSettings for CSV.
FLUENT_SETTING_DEFAULT(std::string, FormatSettings, "");
google::protobuf::Arena* Arena_ = nullptr;
TBulkUpsertSettings& Arena(google::protobuf::Arena* arena) { Arena_ = arena; return *this; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Чем FLUENT_SETTING_DEFAULT не подошел?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Он там const ссылку принимает, а тут нужен указатель

};

template<>
NYdb::NConsoleClient::ESendFormat FromStringImpl<NYdb::NConsoleClient::ESendFormat, char>(const char* s, size_t len) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

А зачем самому писать? Можно же сделать GENERATE_ENUM_SERIALIZATION?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

О. Я обыскался, как это в форматах было сделано. Спасибо, заменю

@@ -925,6 +937,99 @@ TAsyncStatus TImportFileClient::TImpl::UpsertTValueBuffer(const TString& dbPath,
});
}

inline TAsyncStatus TImportFileClient::TImpl::UpsertTValueBufferParquet(
Copy link
Collaborator

Choose a reason for hiding this comment

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

У этих методов очень много кода дублируется, в будущем мб стоит порефакторить

@@ -606,6 +528,249 @@ class TGRpcConnectionsImpl
const TLog& GetLog() const override;

private:
template<bool RequestOnArena, typename TService, typename TRequest, typename TResponse>
void RunImpl(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Какой-то перебор на мой взгляд. Так перелопачивать кишки SDK ради RequestOnArena. Тут можно проще, сделать класс обертку (TRequest), который хранит протоспеку или указатель на нее (в std::variant например). И метод DoRequest можно вынести тогда в сам TRequest

Copy link

github-actions bot commented Jun 22, 2025

2025-06-22 21:52:40 UTC Pre-commit check linux-x86_64-relwithdebinfo for bd8e16f has started.
2025-06-22 21:52:51 UTC Artifacts will be uploaded here
2025-06-22 21:56:22 UTC ya make is running...
2025-06-22 22:33:14 UTC Check cancelled

Copy link

github-actions bot commented Jun 22, 2025

2025-06-22 21:52:45 UTC Pre-commit check linux-x86_64-release-asan for bd8e16f has started.
2025-06-22 21:52:56 UTC Artifacts will be uploaded here
2025-06-22 21:56:32 UTC ya make is running...
2025-06-22 22:33:08 UTC Check cancelled

Copy link

github-actions bot commented Jun 22, 2025

2025-06-22 22:35:12 UTC Pre-commit check linux-x86_64-release-asan for 24ae330 has started.
2025-06-22 22:35:44 UTC Artifacts will be uploaded here
2025-06-22 22:40:03 UTC ya make is running...
🟡 2025-06-23 01:00: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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
16151 15826 0 107 192 26

2025-06-23 01:02:02 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-06-23 01:42:14 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?
2021 (only retried tests) 1701 0 82 209 29

2025-06-23 01:42:34 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-06-23 02:18:59 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?
1945 (only retried tests) 1685 0 64 170 26

🟢 2025-06-23 02:19:18 UTC Build successful.
🔴 2025-06-23 02:19:55 UTC ydbd size 3.9 GiB changed* by +3.4 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: ecb9d76 merge: 24ae330 diff diff %
ydbd size 4 185 150 376 Bytes 4 188 713 720 Bytes +3.4 MiB +0.085%
ydbd stripped size 1 450 983 384 Bytes 1 452 440 472 Bytes +1.4 MiB +0.100%

*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 Jun 22, 2025

2025-06-22 22:36:51 UTC Pre-commit check linux-x86_64-relwithdebinfo for 24ae330 has started.
2025-06-22 22:37:02 UTC Artifacts will be uploaded here
2025-06-22 22:40:39 UTC ya make is running...
🟢 2025-06-23 00:22:10 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
38414 35716 0 0 2664 34

🟢 2025-06-23 00:25:22 UTC Build successful.
🟡 2025-06-23 00:25:40 UTC ydbd size 2.2 GiB changed* by +1.6 MiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: ecb9d76 merge: 24ae330 diff diff %
ydbd size 2 378 944 072 Bytes 2 380 595 112 Bytes +1.6 MiB +0.069%
ydbd stripped size 498 353 192 Bytes 498 575 208 Bytes +216.8 KiB +0.045%

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

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.

2 participants