aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreivanov89 <eivanov89@ydb.tech>2022-09-28 18:33:17 +0300
committereivanov89 <eivanov89@ydb.tech>2022-09-28 18:33:17 +0300
commitdf122cb221a78f439ff06284ca76f23a83ec7302 (patch)
tree595135a8f8184aff094a293795b95b8834103c04
parenteb3f57e00551e64d51e26eb84899be092de5e202 (diff)
downloadydb-df122cb221a78f439ff06284ca76f23a83ec7302.tar.gz
check that row read and use seed to make actors reading different keys
-rw-r--r--ydb/core/tx/datashard/testload/test_load_read_iterator.cpp10
1 files changed, 6 insertions, 4 deletions
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 4b57e426a3a..cda9efab982 100644
--- a/ydb/core/tx/datashard/testload/test_load_read_iterator.cpp
+++ b/ydb/core/tx/datashard/testload/test_load_read_iterator.cpp
@@ -97,7 +97,6 @@ class TReadIteratorPoints : public TActorBootstrapped<TReadIteratorPoints> {
TActorId Pipe;
TInstant StartTs; // actor started to send requests
- size_t Oks = 0;
TVector<TOwnedCellVec> Points;
ui64 ReadCount = 0;
@@ -129,8 +128,9 @@ public:
Become(&TReadIteratorPoints::StateFunc);
auto rng = std::default_random_engine {};
- std::shuffle(Points.begin(), Points.end(), rng);
+ rng.seed(SelfId().Hash());
+ std::shuffle(Points.begin(), Points.end(), rng);
Points.resize(ReadCount);
Connect(ctx);
@@ -194,14 +194,16 @@ private:
}
return StopWithError(ctx, ss.Str());
- return;
}
if (Format != NKikimrTxDataShard::CELLVEC) {
return StopWithError(ctx, "Unsupported format");
}
- Oks += msg->GetRowsCount();
+ if (msg->GetRowsCount() != 1) {
+ return StopWithError(ctx, "Empty reply with data");
+ }
+
RequestTimes.push_back(TDuration::Seconds(RequestTimer.Passed()));
if (CurrentPoint < Points.size()) {