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

Add ChainActor ping kind #12917

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eivanov89
Copy link
Member

@eivanov89 eivanov89 commented Dec 24, 2024

Changelog entry

Added new ydb debug latency kind ActorChain.

Changelog category

  • Experimental feature

Additional information

...

Copy link

github-actions bot commented Dec 24, 2024

2024-12-24 11:53:49 UTC Pre-commit check linux-x86_64-release-asan for c721f12 has started.
2024-12-24 11:54:01 UTC Artifacts will be uploaded here
2024-12-24 11:57:12 UTC ya make is running...
🟡 2024-12-24 13:28:45 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14530 14458 0 18 6 48

🟢 2024-12-24 13:30:07 UTC Build successful.
🟡 2024-12-24 13:30:33 UTC ydbd size 3.6 GiB changed* by +854.0 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 3b45c90 merge: c721f12 diff diff %
ydbd size 3 865 652 536 Bytes 3 866 527 080 Bytes +854.0 KiB +0.023%
ydbd stripped size 1 350 679 408 Bytes 1 351 052 880 Bytes +364.7 KiB +0.028%

*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 Dec 24, 2024

2024-12-24 11:54:33 UTC Pre-commit check linux-x86_64-relwithdebinfo for c721f12 has started.
2024-12-24 11:54:44 UTC Artifacts will be uploaded here
2024-12-24 11:57:56 UTC ya make is running...
🟡 2024-12-24 13:32:06 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?
31510 28539 0 23 2831 117

2024-12-24 13:35:05 UTC ya make is running... (failed tests rerun, try 2)
🟡 2024-12-24 13:47:00 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?
192 (only retried tests) 78 0 2 0 112

2024-12-24 13:47:09 UTC ya make is running... (failed tests rerun, try 3)
🟢 2024-12-24 13:59:02 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
160 (only retried tests) 48 0 0 0 112

🟢 2024-12-24 13:59:11 UTC Build successful.
🟡 2024-12-24 13:59:34 UTC ydbd size 2.1 GiB changed* by +463.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 3b45c90 merge: c721f12 diff diff %
ydbd size 2 235 028 696 Bytes 2 235 503 648 Bytes +463.8 KiB +0.021%
ydbd stripped size 477 983 088 Bytes 478 096 656 Bytes +110.9 KiB +0.024%

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

@CyberROFL CyberROFL left a comment

Choose a reason for hiding this comment

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

proto changes lgtm

{}

TCommandLatency::~TCommandLatency() {
delete ChainConfig;
Copy link
Member

Choose a reason for hiding this comment

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

😨

Copy link
Member Author

Choose a reason for hiding this comment

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

Otherwise I either need to include everything in the header or to rewrite the class using pimpl. Both ways are ugly in this particular case, imho, while this one is slightly less ugly, but fast.

Copy link
Member

Choose a reason for hiding this comment

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

namespace NDebug {
    class TActorChainPingSettings;
}
...
std:unique_ptr<NDebug::TActorChainPingSettings> ChainConfig;

Copy link
Member Author

@eivanov89 eivanov89 Jan 21, 2025

Choose a reason for hiding this comment

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

I did it this way :) But I made a mistake and didn't realize that I needed to define the destructor myself, not use the default one, where the definition of NDebug::TActorChainPingSettingsexists.

@@ -57,6 +65,12 @@ struct TKqpProxyPingSettings : public TOperationRequestSettings<TKqpProxyPingSet
struct TSchemeCachePingSettings : public TOperationRequestSettings<TSchemeCachePingSettings> {};
struct TTxProxyPingSettings : public TOperationRequestSettings<TTxProxyPingSettings> {};

struct TActorChainPingSettings : public TOperationRequestSettings<TActorChainPingSettings> {
size_t ChainLength = 10;
Copy link
Member

Choose a reason for hiding this comment

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

Why not FLUENT_SETTING...?

Copy link
Member Author

Choose a reason for hiding this comment

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

I prefer simple struct with direct member access in a such simple cases.

Copy link
Member

@CyberROFL CyberROFL Jan 21, 2025

Choose a reason for hiding this comment

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

It is not a common way in cpp sdk, especially for *Settings structures.

@eivanov89 eivanov89 force-pushed the ydb-chainactor-ping branch from 8885d5c to 0dbc726 Compare January 21, 2025 11:15
Copy link

github-actions bot commented Jan 21, 2025

2025-01-21 11:17:09 UTC Pre-commit check linux-x86_64-release-asan for e5f0dc0 has started.
2025-01-21 11:17:21 UTC Artifacts will be uploaded here
2025-01-21 11:20:45 UTC ya make is running...
🟡 2025-01-21 12:54:41 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?
13771 13699 0 27 16 29

2025-01-21 12:55:49 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-01-21 13:07:48 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?
105 (only retried tests) 70 0 7 3 25

2025-01-21 13:07:57 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-01-21 13:19:26 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?
58 (only retried tests) 27 0 6 2 23

🟢 2025-01-21 13:19:33 UTC Build successful.
🟡 2025-01-21 13:20:03 UTC ydbd size 3.6 GiB changed* by +834.9 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 7ff68ea merge: e5f0dc0 diff diff %
ydbd size 3 853 643 800 Bytes 3 854 498 752 Bytes +834.9 KiB +0.022%
ydbd stripped size 1 346 418 256 Bytes 1 346 783 568 Bytes +356.8 KiB +0.027%

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

2025-01-21 11:17:44 UTC Pre-commit check linux-x86_64-relwithdebinfo for e5f0dc0 has started.
2025-01-21 11:17:56 UTC Artifacts will be uploaded here
2025-01-21 11:21:17 UTC ya make is running...
🟡 2025-01-21 13:19:30 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?
28086 25573 0 4 2387 122

2025-01-21 13:21:53 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-01-21 13:35:33 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?
190 (only retried tests) 71 0 1 0 118

2025-01-21 13:35:41 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-01-21 13:47:32 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
173 (only retried tests) 56 0 0 0 117

🟢 2025-01-21 13:47:39 UTC Build successful.
🟡 2025-01-21 13:48:06 UTC ydbd size 2.1 GiB changed* by +451.5 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 7ff68ea merge: e5f0dc0 diff diff %
ydbd size 2 217 035 856 Bytes 2 217 498 192 Bytes +451.5 KiB +0.021%
ydbd stripped size 468 702 000 Bytes 468 810 480 Bytes +105.9 KiB +0.023%

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

"chain-length", TStringBuilder() << "Chain length (ActorChain kind only)")
.OptionalArgument("INT").StoreResult(&ChainConfig->ChainLength).DefaultValue(ChainConfig->ChainLength);
config.Opts->AddLongOption(
"chain-work-usec", TStringBuilder() << "Amount of work for each actor in the chain (ActorChain kind only)")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better don't use "usec" in option name. Leave it in the description section as a default. I hope in the nearest future there will be an opportunity to use "1ms", "3s" e.t.c for options with time intervals

.OptionalArgument("STRING").StoreResult(&RunKind).DefaultValue(DEFAULT_RUN_KIND);

// actor chain options
config.Opts->AddLongOption(
Copy link
Collaborator

Choose a reason for hiding this comment

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

New CLI options should be addressed in changelog.md

ydb/apps/ydb/CHANGELOG.md Outdated Show resolved Hide resolved
pnv1
pnv1 previously approved these changes Jan 23, 2025
pnv1
pnv1 previously approved these changes Jan 23, 2025
Copy link

github-actions bot commented Jan 23, 2025

2025-01-23 10:29:25 UTC Pre-commit check linux-x86_64-relwithdebinfo for d42bfc4 has started.
2025-01-23 10:29:38 UTC Artifacts will be uploaded here
2025-01-23 10:32:52 UTC ya make is running...
🟡 2025-01-23 11:56:06 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?
28028 25507 0 4 2397 120

2025-01-23 11:58:30 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-01-23 12:07:49 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?
184 (only retried tests) 67 0 1 0 116

2025-01-23 12:07:57 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-01-23 12:17:05 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
171 (only retried tests) 55 0 0 0 116

🟢 2025-01-23 12:17:12 UTC Build successful.
🟡 2025-01-23 12:17:32 UTC ydbd size 2.1 GiB changed* by +455.5 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 78fee80 merge: d42bfc4 diff diff %
ydbd size 2 220 428 304 Bytes 2 220 894 688 Bytes +455.5 KiB +0.021%
ydbd stripped size 469 670 576 Bytes 469 783 120 Bytes +109.9 KiB +0.024%

*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 23, 2025

2025-01-23 10:29:37 UTC Pre-commit check linux-x86_64-release-asan for d42bfc4 has started.
2025-01-23 10:29:50 UTC Artifacts will be uploaded here
2025-01-23 10:33:10 UTC ya make is running...
🟡 2025-01-23 12:03:56 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?
13661 13599 0 21 14 27

2025-01-23 12:05:09 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-01-23 12:17:04 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?
92 (only retried tests) 58 0 2 7 25

2025-01-23 12:17:14 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-01-23 12:28:44 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?
56 (only retried tests) 22 0 3 6 25

🟢 2025-01-23 12:28:51 UTC Build successful.
🟡 2025-01-23 12:29:19 UTC ydbd size 3.6 GiB changed* by +834.9 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 78fee80 merge: d42bfc4 diff diff %
ydbd size 3 858 261 672 Bytes 3 859 116 592 Bytes +834.9 KiB +0.022%
ydbd stripped size 1 349 573 328 Bytes 1 349 938 608 Bytes +356.7 KiB +0.027%

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

@@ -57,6 +65,12 @@ struct TKqpProxyPingSettings : public TOperationRequestSettings<TKqpProxyPingSet
struct TSchemeCachePingSettings : public TOperationRequestSettings<TSchemeCachePingSettings> {};
struct TTxProxyPingSettings : public TOperationRequestSettings<TTxProxyPingSettings> {};

struct TActorChainPingSettings : public TOperationRequestSettings<TActorChainPingSettings> {
FLUENT_SETTING_DEFAULT(size_t, ChainLength, 10);
FLUENT_SETTING_DEFAULT(size_t, WorkUsec, 5);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Это время? Не надо использовать size_t для такого, тут надо std::chrono::microseconds.
Также сокращение Usec не очень писать тогда, по типу и так понятно будет. И на что влияет эта опция, по названию не очень понятно

Copy link
Member Author

Choose a reason for hiding this comment

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

I would argue, that size_t in this particular place is absolutely fine. However, I agree that naming could be better.

Copy link
Collaborator

Choose a reason for hiding this comment

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

std::chrono it's a modern and type-safe approach. Why do you think that size_t is better to use here?

@eivanov89 eivanov89 enabled auto-merge (squash) January 23, 2025 17:11
@eivanov89 eivanov89 requested a review from pnv1 January 23, 2025 17:11
Copy link

github-actions bot commented Jan 23, 2025

2025-01-23 17:14:39 UTC Pre-commit check linux-x86_64-relwithdebinfo for 93a408b has started.
2025-01-23 17:14:55 UTC Artifacts will be uploaded here
2025-01-23 17:18:12 UTC ya make is running...
🟡 2025-01-23 18:28:59 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?
28030 25306 0 33 2626 65

2025-01-23 18:31:25 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-01-23 18:43:54 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?
390 (only retried tests) 262 0 1 7 120

2025-01-23 18:44:04 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-01-23 18:53:09 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
176 (only retried tests) 59 0 0 0 117

🟢 2025-01-23 18:53:17 UTC Build successful.
🟡 2025-01-23 18:53:39 UTC ydbd size 2.1 GiB changed* by +451.5 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 38d0188 merge: 93a408b diff diff %
ydbd size 2 220 477 584 Bytes 2 220 939 952 Bytes +451.5 KiB +0.021%
ydbd stripped size 469 681 648 Bytes 469 790 160 Bytes +106.0 KiB +0.023%

*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 23, 2025

2025-01-23 17:14:46 UTC Pre-commit check linux-x86_64-release-asan for 93a408b has started.
2025-01-23 17:15:00 UTC Artifacts will be uploaded here
2025-01-23 17:18:12 UTC ya make is running...
🟡 2025-01-23 18:16: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?
13661 13610 0 12 7 32

2025-01-23 18:17:58 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-01-23 18:30:12 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
80 (only retried tests) 47 0 0 7 26

🟢 2025-01-23 18:30:22 UTC Build successful.
🟡 2025-01-23 18:30:46 UTC ydbd size 3.6 GiB changed* by +838.8 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 38d0188 merge: 93a408b diff diff %
ydbd size 3 858 369 408 Bytes 3 859 228 360 Bytes +838.8 KiB +0.022%
ydbd stripped size 1 349 602 288 Bytes 1 349 971 600 Bytes +360.7 KiB +0.027%

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

4 participants