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

YQ-2803 Exception checking in checkpoint storages #1540

Merged

Conversation

kardymonds
Copy link
Collaborator

Changelog entry

Changelog category

  • Not for changelog (changelog entry is not required)

Additional information

@kardymonds kardymonds requested a review from a team as a code owner February 2, 2024 07:28
Copy link

github-actions bot commented Feb 2, 2024

2024-02-02 07:31:49 UTC Pre-commit check for 68ea245 has started.
2024-02-02 07:31:52 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-02 07:33:28 UTC Build successful.
2024-02-02 07:33:45 UTC Tests are running...
🔴 2024-02-02 09:09:14 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14522 14397 0 33 57 35

Copy link

github-actions bot commented Feb 2, 2024

2024-02-02 07:31:55 UTC Pre-commit check for 68ea245 has started.
2024-02-02 07:31:58 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-02 07:33:31 UTC Build successful.
2024-02-02 07:33:44 UTC Tests are running...
🟢 2024-02-02 08:58:06 UTC Tests successful.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
58831 49540 0 0 9261 30

Copy link

github-actions bot commented Feb 2, 2024

2024-02-02 15:18:58 UTC Pre-commit check for 6cb6dd2 has started.
2024-02-02 15:18:59 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-02 15:20:28 UTC Build successful.
2024-02-02 15:20:36 UTC Tests are running...
🔴 2024-02-02 16:42:48 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
58859 49539 0 5 9265 50

Copy link

github-actions bot commented Feb 2, 2024

2024-02-02 15:20:53 UTC Pre-commit check for 6cb6dd2 has started.
2024-02-02 15:20:55 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-02 15:22:29 UTC Build successful.
2024-02-02 15:22:45 UTC Tests are running...
🔴 2024-02-02 16:57:59 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14524 14364 0 39 64 57

return StatusToIssues(future.GetValue());
} catch (...) {
TIssues issues;
issues.AddIssue(CurrentExceptionMessage());
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.

Added text "StatusToIssues failed"

return TCreateCheckpointResult(TString(), std::move(issues));
} else {
return TCreateCheckpointResult(checkpointContext->CheckpointGraphDescriptionContext->GraphDescId, NYql::TIssues());
try {
Copy link
Collaborator

Choose a reason for hiding this comment

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

почему бы не использовать в этих местах функцию StatusToIssues ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok, used

return TCreateCheckpointResult(checkpointContext->CheckpointGraphDescriptionContext->GraphDescId, NYql::TIssues());
try {
if (NYql::TIssues issues = StatusToIssues(future.GetValue())) {
return TCreateCheckpointResult(TString(), std::move(issues));
Copy link
Collaborator

Choose a reason for hiding this comment

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

if/else тут не нужны

descId = ...;
issues = StatusToIssues(...);
return TCreateCheckpointResult(descId, std::move(issues));

Copy link
Collaborator Author

@kardymonds kardymonds Feb 5, 2024

Choose a reason for hiding this comment

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

fixed

Copy link

github-actions bot commented Feb 5, 2024

2024-02-05 06:09:17 UTC Pre-commit check for d9e4188 has started.
2024-02-05 06:09:20 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-05 06:10:54 UTC Build successful.
2024-02-05 06:11:09 UTC Tests are running...
🔴 2024-02-05 07:33:52 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
58861 49560 0 1 9263 37

Copy link

github-actions bot commented Feb 5, 2024

2024-02-05 06:09:32 UTC Pre-commit check for d9e4188 has started.
2024-02-05 06:09:34 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-05 06:11:17 UTC Build successful.
2024-02-05 06:11:29 UTC Tests are running...
🔴 2024-02-05 07:47:48 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14520 14389 0 40 56 35


return StatusToIssues(future).Apply(
[result] (const TFuture<TIssues>& future) {
return std::make_pair(std::move(result->Size), std::move(future.GetValue()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

везде вместо GetValue предлагают использовать ExtractValue, чтобы делался мув и не было копий

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

У Apply() сигнатура должна быть ...(const TFuture&>()) (future.h), а ExtractValue не констатная. Поэтому так не получается

Copy link
Collaborator

Choose a reason for hiding this comment

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

тогда давай убирать бесполезные std::move. в этой строке их две штуки, как я понимаю

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Убрал лишние std::move


return StatusToIssues(future).Apply(
[result] (const TFuture<TIssues>& future) {
return std::make_pair(std::move(result->Size), std::move(future.GetValue()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

тогда давай убирать бесполезные std::move. в этой строке их две штуки, как я понимаю

UNIT_ASSERT(issues.Size() == 1);
UNIT_ASSERT(issues.ToString().Contains(text));
}
};
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

github-actions bot commented Feb 7, 2024

2024-02-07 09:22:37 UTC Pre-commit check for 0584077 has started.
2024-02-07 09:22:40 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-07 10:00:15 UTC Build successful.
2024-02-07 10:00:31 UTC Tests are running...
🔴 2024-02-07 11:28:52 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
58936 49610 0 2 9278 46

Copy link

github-actions bot commented Feb 7, 2024

2024-02-07 09:30:50 UTC Pre-commit check for 0584077 has started.
2024-02-07 09:30:52 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-07 10:14:56 UTC Build successful.
2024-02-07 10:15:07 UTC Tests are running...
🔴 2024-02-07 12:00:04 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14568 14427 0 29 77 35

Copy link

github-actions bot commented Feb 7, 2024

2024-02-07 12:02:35 UTC Pre-commit check for 6f5eb6d has started.
2024-02-07 12:02:36 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-02-07 12:03:53 UTC Build successful.
2024-02-07 12:04:03 UTC Tests are running...
🔴 2024-02-07 13:50:01 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
67127 56274 0 1 10820 32

Copy link

github-actions bot commented Feb 7, 2024

2024-02-07 12:02:56 UTC Pre-commit check for 6f5eb6d has started.
2024-02-07 12:02:57 UTC Build linux-x86_64-release-asan is running...
🟢 2024-02-07 12:04:10 UTC Build successful.
2024-02-07 12:04:19 UTC Tests are running...
🔴 2024-02-07 13:41:57 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14576 14460 0 17 71 28

@kardymonds kardymonds merged commit faf3e89 into ydb-platform:main Feb 8, 2024
2 of 4 checks passed
kardymonds added a commit to kardymonds/ydb that referenced this pull request Feb 8, 2024
* Exception check

* Add new line

* remove comment

* Use StatusToIssues()

* remove some std::move

* remove ;
@vitstn vitstn mentioned this pull request Feb 8, 2024
kardymonds added a commit that referenced this pull request Feb 8, 2024
* Exception check

* Add new line

* remove comment

* Use StatusToIssues()

* remove some std::move

* remove ;
@starlinskiy starlinskiy mentioned this pull request Feb 12, 2024
@serbel324 serbel324 mentioned this pull request Feb 13, 2024
@vitstn vitstn mentioned this pull request Feb 16, 2024
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