aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreivanov89 <eivanov89@ydb.tech>2022-09-27 14:54:41 +0300
committereivanov89 <eivanov89@ydb.tech>2022-09-27 14:54:41 +0300
commit678a670bed21b61a2596e567508fa59d64d9c1b6 (patch)
tree972adfb30875bbeee94d93c2db38d4f25c0c8f02
parenta19f1383d40306f3ac14d8e07f68cb1e0365d44d (diff)
downloadydb-678a670bed21b61a2596e567508fa59d64d9c1b6.tar.gz
PR from branch users/eivanov89/-iterator-load-actor
cleanup load logs option to configure load chunk sizes via proto
-rw-r--r--ydb/core/protos/datashard_load.proto3
-rw-r--r--ydb/core/tx/datashard/testload/test_load_read_iterator.cpp22
2 files changed, 18 insertions, 7 deletions
diff --git a/ydb/core/protos/datashard_load.proto b/ydb/core/protos/datashard_load.proto
index e88e6e7609..728e332073 100644
--- a/ydb/core/protos/datashard_load.proto
+++ b/ydb/core/protos/datashard_load.proto
@@ -28,9 +28,10 @@ message TEvTestLoadRequest {
optional uint64 RowCount = 2;
repeated uint32 Inflights = 3;
+ repeated uint32 Chunks = 4;
// Specifies the format for result data in TEvReadResult
- optional NKikimrTxDataShard.EScanDataFormat ResultFormat = 4;
+ optional NKikimrTxDataShard.EScanDataFormat ResultFormat = 5;
}
optional uint64 Cookie = 1;
diff --git a/ydb/core/tx/datashard/testload/test_load_read_iterator.cpp b/ydb/core/tx/datashard/testload/test_load_read_iterator.cpp
index 30b86bc9ef..6c3540259c 100644
--- a/ydb/core/tx/datashard/testload/test_load_read_iterator.cpp
+++ b/ydb/core/tx/datashard/testload/test_load_read_iterator.cpp
@@ -121,7 +121,7 @@ public:
void Bootstrap(const TActorContext& ctx) {
LOG_INFO_S(ctx, NKikimrServices::DS_LOAD_TEST, "TReadIteratorPoints# " << SelfId()
- << " with parent# " << Parent << " Bootstrap called");
+ << " with parent# " << Parent << " Bootstrap called, will read keys# " << Points.size());
Become(&TReadIteratorPoints::StateFunc);
@@ -263,7 +263,7 @@ public:
void Bootstrap(const TActorContext& ctx) {
LOG_INFO_S(ctx, NKikimrServices::DS_LOAD_TEST, "ReadIteratorScan# " << SelfId()
- << " with parent# " << Parent << " Bootstrap called");
+ << " with parent# " << Parent << " Bootstrap called, sample# " << SampleKeyCount);
Become(&TReadIteratorScan::StateFunc);
Connect(ctx);
@@ -316,7 +316,6 @@ private:
}
return StopWithError(ctx, ss.Str());
- return;
}
if (Format != NKikimrTxDataShard::CELLVEC) {
@@ -335,7 +334,10 @@ private:
if (record.GetFinished() || SampledKeys.size() >= SampleKeyCount) {
LOG_NOTICE_S(ctx, NKikimrServices::DS_LOAD_TEST, "ReadIteratorScan# " << SelfId()
- << " with parent# " << Parent << " finished in " << delta << ", sampled# " << SampledKeys.size());
+ << " with parent# " << Parent << " finished in " << delta
+ << ", sampled# " << SampledKeys.size()
+ << ", iter finished# " << record.GetFinished()
+ << ", oks# " << Oks);
ctx.Send(Parent, new TEvPrivate::TEvKeys(std::move(SampledKeys)));
return Die(ctx);
@@ -344,7 +346,8 @@ private:
return;
} else if (record.GetFinished()) {
LOG_NOTICE_S(ctx, NKikimrServices::DS_LOAD_TEST, "ReadIteratorScan# " << SelfId()
- << " with parent# " << Parent << " finished in " << delta);
+ << " with parent# " << Parent << " finished in " << delta
+ << ", read# " << Oks);
auto response = std::make_unique<TEvDataShardLoad::TEvTestLoadFinished>(0);
response->Report = TEvDataShardLoad::TLoadReport();
@@ -428,7 +431,7 @@ class TReadIteratorLoadScenario : public TActorBootstrapped<TReadIteratorLoadSce
ui64 Inflight = 0;
// setup for fullscan
- const TVector<ui64> ChunkSizes = {0, 0, 1, 1, 10, 10, 100, 100, 1000, 1000}; // each twice intentionally
+ TVector<ui64> ChunkSizes = {0, 0, 1, 1, 10, 10, 100, 100, 1000, 1000}; // each twice intentionally
size_t ChunkIndex = 0;
// note that might be overwritten by test incoming test config
@@ -452,6 +455,13 @@ public:
Inflights.push_back(inflight);
}
}
+
+ if (Config.ChunksSize()) {
+ ChunkSizes.clear();
+ for (auto chunk: Config.GetChunks()) {
+ ChunkSizes.push_back(chunk);
+ }
+ }
}
void Bootstrap(const TActorContext& ctx) {