Skip to content

YQ-3697 Add partition count to fqrun #9837

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

Merged
merged 19 commits into from
Feb 20, 2025

Conversation

kardymonds
Copy link
Collaborator

Changelog entry

...

Changelog category

  • Not for changelog (changelog entry is not required)

Additional information

...

Copy link

github-actions bot commented Sep 27, 2024

2024-09-27 05:15:23 UTC Pre-commit check linux-x86_64-relwithdebinfo for afecd01 has started.
2024-09-27 05:15:34 UTC Artifacts will be uploaded here
2024-09-27 05:17:56 UTC ya make is running...
🟡 2024-09-27 05:52:36 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
25026 20942 0 3 4081 0

Copy link

github-actions bot commented Sep 27, 2024

2024-09-27 05:18:11 UTC Pre-commit check linux-x86_64-release-asan for afecd01 has started.
2024-09-27 05:18:22 UTC Artifacts will be uploaded here
2024-09-27 05:20:52 UTC ya make is running...
🟢 2024-09-27 05:46:57 UTC Tests successful.

Test history | Ya make output

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

aakulaga-ydb
aakulaga-ydb previously approved these changes Sep 27, 2024
@maximyurchuk maximyurchuk added the rebase-and-check Rebase PR with the current base branch and check label Sep 27, 2024
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Sep 27, 2024
Copy link

github-actions bot commented Sep 27, 2024

2024-09-27 10:02:08 UTC Pre-commit check linux-x86_64-release-asan for 7529bc7 has started.
2024-09-27 10:02:51 UTC Artifacts will be uploaded here
2024-09-27 10:05:48 UTC ya make is running...
🟢 2024-09-27 10:32:24 UTC Tests successful.

Test history | Ya make output

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

🟢 2024-09-27 10:32:30 UTC Build successful.

Copy link

github-actions bot commented Sep 27, 2024

2024-09-27 10:02:10 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7529bc7 has started.
2024-09-27 10:02:54 UTC Artifacts will be uploaded here
2024-09-27 10:05:52 UTC ya make is running...
🟡 2024-09-27 10:43:18 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
25026 20942 0 3 4081 0

2024-09-27 10:45:24 UTC ya make is running... (failed tests rerun, try 2)
🟡 2024-09-27 10:49:12 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output

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

2024-09-27 10:49:21 UTC ya make is running... (failed tests rerun, try 3)
🔴 2024-09-27 10:53:06 UTC Some tests failed, follow the links below.

Test history | Ya make output

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

🟢 2024-09-27 10:53:12 UTC Build successful.

Copy link

github-actions bot commented Sep 30, 2024

2024-09-30 05:50:52 UTC Pre-commit check linux-x86_64-relwithdebinfo for dd05e1c has started.
2024-09-30 05:51:02 UTC Artifacts will be uploaded here
2024-09-30 06:04:35 UTC ya make is running...
🟢 2024-09-30 08:28:44 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
25026 20945 0 0 4081 0

🟢 2024-09-30 08:30:40 UTC Build successful.

Copy link

github-actions bot commented Sep 30, 2024

2024-09-30 05:53:12 UTC Pre-commit check linux-x86_64-release-asan for dd05e1c has started.
2024-09-30 05:53:22 UTC Artifacts will be uploaded here
2024-09-30 06:04:46 UTC ya make is running...
🟢 2024-09-30 07:37:51 UTC Tests successful.

Test history | Ya make output

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

🟢 2024-09-30 07:37:57 UTC Build successful.

return 1;
}
fileGateway->AddDummyTopic(TDummyTopic("pq", TString(topicName), TString(filePath)));
size_t partitionCount = !partitionCountStr.empty() ? partitionCount = FromString<size_t>(partitionCountStr) : 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

перемудрил

@@ -214,18 +215,26 @@ struct TDummyPartitionSession: public NYdb::NTopic::TPartitionSession {
std::shared_ptr<NYdb::NTopic::IReadSession> TFileTopicClient::CreateReadSession(const NYdb::NTopic::TReadSessionSettings& settings) {
Y_ENSURE(!settings.Topics_.empty());
TString topicPath = settings.Topics_.front().Path_;
Copy link
Collaborator

Choose a reason for hiding this comment

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

чтобы уменьшить копипасту положи settings.Topics_.front() в переменную

Y_ENSURE(topicsIt->second.Path);

TString filePath;
if (TFsPath(*topicsIt->second.Path).IsDirectory()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

предлагаю положить TFsPath(*topicsIt->second.Path) в отдельную переменную, у тебя этот объект строится в двух местах

Y_ENSURE(topicsIt->second.Path);

TString filePath;
if (TFsPath(*topicsIt->second.Path).IsDirectory()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

рекомендую *topicsIt->second.Path положить в отдельную переменную, это выражение много где встречается

if (TFsPath(*topicsIt->second.Path).Exists() && topicsIt->second.PartitionsCount == 1) {
filePath = *topicsIt->second.Path;
} else {
filePath = TString(*topicsIt->second.Path) + "_" + ToString(partitionId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

тут подошел бы TStringBuilder

Copy link

github-actions bot commented Oct 2, 2024

2024-10-02 09:27:43 UTC Pre-commit check linux-x86_64-release-asan for bac2e7c has started.
2024-10-02 09:28:21 UTC Artifacts will be uploaded here
2024-10-02 09:31:11 UTC ya make is running...
🟢 2024-10-02 09:34:27 UTC Tests successful.

Test history | Ya make output

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

🟢 2024-10-02 09:34:34 UTC Build successful.

Copy link

github-actions bot commented Oct 2, 2024

2024-10-02 09:32:08 UTC Pre-commit check linux-x86_64-relwithdebinfo for bac2e7c has started.
2024-10-02 09:32:18 UTC Artifacts will be uploaded here
2024-10-02 09:34:49 UTC ya make is running...
🟢 2024-10-02 09:47:49 UTC Tests successful.

Test history | Ya make output

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
25026 20945 0 0 4081 0

🟢 2024-10-02 09:50:04 UTC Build successful.

struct stat stats;
if (fstat(file, &stats) != 0) {
return false;
}
Copy link
Collaborator

@yumkam yumkam Oct 3, 2024

Choose a reason for hiding this comment

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

  1. leaks file fd (why not just stat? but...)
  2. racing (between check and actual open);
    ... and I'm not sure, why pipe should be special-cased at all?

Copy link
Collaborator

Choose a reason for hiding this comment

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

желательно не использовать ifdef в нашем коде. нельзя ли заюзать какую-нибудь функцию из util | library/cpp ?

@@ -211,21 +212,51 @@ struct TDummyPartitionSession: public NYdb::NTopic::TPartitionSession {
}
};

static bool IsPipe(const TString& filePath) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

используем анонимные неймспейсы вместо static

Copy link

github-actions bot commented Oct 7, 2024

2024-10-07 05:27:48 UTC Pre-commit check linux-x86_64-relwithdebinfo for 2b077f9 has started.
2024-10-07 05:27:59 UTC Artifacts will be uploaded here
2024-10-07 05:30:24 UTC ya make is running...
🟢 2024-10-07 05:43:32 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
25026 20945 0 0 4081 0

🟢 2024-10-07 05:45:35 UTC Build successful.

Copy link

github-actions bot commented Oct 7, 2024

2024-10-07 05:27:54 UTC Pre-commit check linux-x86_64-release-asan for 2b077f9 has started.
2024-10-07 05:28:03 UTC Artifacts will be uploaded here
2024-10-07 05:30:25 UTC ya make is running...
🟢 2024-10-07 05:33:33 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2024-10-07 05:33:39 UTC Build successful.

if (fsPath.Exists() && topicsIt->second.PartitionsCount == 1) {
filePath = *path;
} else {
filePath = TStringBuilder() << *path << "_" << ToString(partitionId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

ToString избыточен

uzhastik
uzhastik previously approved these changes Oct 9, 2024
@dorooleg
Copy link
Collaborator

Конфликты появились

@kardymonds kardymonds changed the title YQ-3697 Add partition count to dqrun YQ-3697 Add partition count to fqrun Feb 18, 2025
Copy link

🟢 2025-02-18 12:26:19 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Feb 18, 2025

2025-02-18 12:26:22 UTC Pre-commit check linux-x86_64-relwithdebinfo for 6404ca2 has started.
2025-02-18 12:26:34 UTC Artifacts will be uploaded here
2025-02-18 12:29:00 UTC ya make is running...
2025-02-18 12:33:28 UTC Check cancelled

Copy link

github-actions bot commented Feb 18, 2025

2025-02-18 12:26:23 UTC Pre-commit check linux-x86_64-release-asan for 6404ca2 has started.
2025-02-18 12:26:36 UTC Artifacts will be uploaded here
2025-02-18 12:29:08 UTC ya make is running...
2025-02-18 12:33:27 UTC Check cancelled

Copy link

github-actions bot commented Feb 18, 2025

2025-02-18 12:36:49 UTC Pre-commit check linux-x86_64-relwithdebinfo for eec7df9 has started.
2025-02-18 12:37:02 UTC Artifacts will be uploaded here
2025-02-18 12:39:30 UTC ya make is running...
🟢 2025-02-18 12:48:07 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
7067 5825 0 0 1242 0

🟢 2025-02-18 12:48:53 UTC Build successful.
🟢 2025-02-18 12:49:06 UTC ydbd size 2.1 GiB changed* by 0 Bytes, which is <= 0 Bytes vs main: OK

ydbd size dash main: 24d8aaa merge: eec7df9 diff diff %
ydbd size 2 236 501 936 Bytes 2 236 501 936 Bytes 0 Bytes 0.000%
ydbd stripped size 473 946 200 Bytes 473 946 200 Bytes 0 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

Copy link

github-actions bot commented Feb 18, 2025

2025-02-18 12:36:56 UTC Pre-commit check linux-x86_64-release-asan for eec7df9 has started.
2025-02-18 12:37:09 UTC Artifacts will be uploaded here
2025-02-18 12:39:27 UTC ya make is running...
🟢 2025-02-18 12:44:25 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-02-18 12:44:37 UTC Build successful.
🟡 2025-02-18 12:44:51 UTC ydbd size 3.6 GiB changed* by +547.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 0a1a524 merge: eec7df9 diff diff %
ydbd size 3 890 200 192 Bytes 3 890 761 152 Bytes +547.8 KiB +0.014%
ydbd stripped size 1 361 992 768 Bytes 1 362 114 240 Bytes +118.6 KiB +0.009%

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

TStringBuf(others).Split(':', path, partitionCountStr);
size_t partitionCount = !partitionCountStr.empty() ? FromString<size_t>(partitionCountStr) : 1;
if (topicName.empty() || path.empty()) {
ythrow yexception() << "Incorrect table mapping, expected form topic@path[:partitions_count]" << Endl;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Кажется тут стоит написать Incorrect PQ file mapping или что-то в таком духе, чем Incorrect table mapping

}
if (!PqFilesMapping.emplace(topicName, filePath).second) {
if (!PqFilesMapping.emplace(topicName, NYql::TDummyTopic("pq", TString(topicName), TString(path), partitionCount) ).second) {
Copy link
Collaborator

@GrigoriyPA GrigoriyPA Feb 18, 2025

Choose a reason for hiding this comment

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

Лишние пробелы между скобками в ) ).second) {

Copy link

github-actions bot commented Feb 20, 2025

2025-02-20 06:54:17 UTC Pre-commit check linux-x86_64-relwithdebinfo for ca8eb8f has started.
2025-02-20 06:55:03 UTC Artifacts will be uploaded here
2025-02-20 06:58:07 UTC ya make is running...
🟢 2025-02-20 07:06:07 UTC Tests successful.

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
7070 5825 0 0 1245 0

🟢 2025-02-20 07:06:45 UTC Build successful.
🟡 2025-02-20 07:06:55 UTC ydbd size 2.1 GiB changed* by +367.9 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: b1f202d merge: ca8eb8f diff diff %
ydbd size 2 238 972 272 Bytes 2 239 349 000 Bytes +367.9 KiB +0.017%
ydbd stripped size 474 418 840 Bytes 474 513 656 Bytes +92.6 KiB +0.020%

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

2025-02-20 06:54:56 UTC Pre-commit check linux-x86_64-release-asan for ca8eb8f has started.
2025-02-20 06:55:24 UTC Artifacts will be uploaded here
2025-02-20 06:57:44 UTC ya make is running...
🟢 2025-02-20 07:02:44 UTC Tests successful.

Test history | Ya make output | Test bloat

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

🟢 2025-02-20 07:02:51 UTC Build successful.
🟡 2025-02-20 07:03:04 UTC ydbd size 3.6 GiB changed* by +726.3 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: b1f202d merge: ca8eb8f diff diff %
ydbd size 3 894 701 128 Bytes 3 895 444 872 Bytes +726.3 KiB +0.019%
ydbd stripped size 1 363 549 728 Bytes 1 363 998 080 Bytes +437.8 KiB +0.033%

*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.

7 participants