@@ -651,7 +651,6 @@ Y_UNIT_TEST(TestGivenMirror3DCGetWithFirstSlowDisk) {
651
651
652
652
TTestState testState (runtime, type, DSProxyEnv.Info );
653
653
654
-
655
654
TEvBlobStorage::TEvGet::TPtr ev = testState.CreateGetRequest ({blobId}, false );
656
655
TActorId getActorId = runtime.Register (DSProxyEnv.CreateGetRequestActor (ev, NKikimrBlobStorage::TabletLog).release ());
657
656
runtime.EnableScheduleForActor (getActorId);
@@ -704,7 +703,6 @@ Y_UNIT_TEST(TestGivenBlock42GetThenVGetResponseParts2523Nodata4ThenGetOk) {
704
703
UNIT_ASSERT (getResult->Responses [0 ].Status == NKikimrProto::OK);
705
704
}
706
705
707
-
708
706
struct TBlobPack {
709
707
ui32 Count;
710
708
ui32 DataLength;
@@ -1285,6 +1283,141 @@ Y_UNIT_TEST(TestGivenBlock42Put6PartsOnOneVDiskWhenDiscoverThenRecoverFirst) {
1285
1283
}
1286
1284
}
1287
1285
1286
+ Y_UNIT_TEST (TestBlock42CheckLwtrack) {
1287
+ NLWTrace::TManager mngr (*Singleton<NLWTrace::TProbeRegistry>(), true );
1288
+ NLWTrace::TOrbit orbit;
1289
+ NLWTrace::TTraceRequest req;
1290
+ req.SetIsTraced (true );
1291
+ mngr.HandleTraceRequest (req, orbit);
1292
+
1293
+
1294
+ TTestBasicRuntime runtime (1 , false );
1295
+ TBlobStorageGroupType type = {TErasureType::Erasure4Plus2Block};
1296
+ Setup (runtime, type);
1297
+ runtime.SetLogPriority (NKikimrServices::BS_PROXY_GET, NLog::PRI_DEBUG);
1298
+
1299
+ TActorId proxy = MakeBlobStorageProxyID (GROUP_ID);
1300
+ TActorId sender = runtime.AllocateEdgeActor (0 );
1301
+
1302
+ TString data (" xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" );
1303
+ TLogoBlobID logoblobid (1 , 0 , 0 , 0 , (ui32)data.size (), 0 );
1304
+
1305
+ TVector<TVDiskState> subgroup;
1306
+ PrepareBlobSubgroup (logoblobid, data, subgroup, runtime, type);
1307
+
1308
+ auto ev = new TEvBlobStorage::TEvGet (logoblobid, 0 , 0 , TInstant::Max (),
1309
+ NKikimrBlobStorage::EGetHandleClass::FastRead);
1310
+ ev->Orbit = std::move (orbit);
1311
+
1312
+ runtime.Send (new IEventHandle (proxy, sender, ev));
1313
+ for (ui32 i = 0 ; i < 6 ; ++i) {
1314
+ TAutoPtr<IEventHandle> handle;
1315
+ auto vget = runtime.GrabEdgeEventRethrow <TEvBlobStorage::TEvVGet>(handle);
1316
+ UNIT_ASSERT (vget);
1317
+ for (size_t idx = 0 ; idx < subgroup.size (); ++idx) {
1318
+ if (subgroup[idx].ActorId == handle->Recipient ) {
1319
+ subgroup[idx].SetCookiesAndSenderFrom (handle.Get (), vget);
1320
+ }
1321
+ }
1322
+ }
1323
+
1324
+ SendVGetResult (6 , NKikimrProto::OK, 2 , subgroup, runtime);
1325
+ SendVGetResult (4 , NKikimrProto::OK, 5 , subgroup, runtime);
1326
+ SendVGetResult (1 , NKikimrProto::OK, 2 , subgroup, runtime);
1327
+ SendVGetResult (2 , NKikimrProto::OK, 3 , subgroup, runtime);
1328
+ SendVGetResult (7 , NKikimrProto::NODATA, 1 , subgroup, runtime);
1329
+ SendVGetResult (3 , NKikimrProto::OK, 4 , subgroup, runtime);
1330
+ SendVGetResult (5 , NKikimrProto::OK, 6 , subgroup, runtime);
1331
+ SendVGetResult (0 , NKikimrProto::OK, 1 , subgroup, runtime);
1332
+
1333
+ TAutoPtr<IEventHandle> handle;
1334
+ auto getResult = runtime.GrabEdgeEventRethrow <TEvBlobStorage::TEvGetResult>(handle);
1335
+ UNIT_ASSERT (getResult);
1336
+ UNIT_ASSERT (getResult->Status == NKikimrProto::OK);
1337
+ UNIT_ASSERT (getResult->ResponseSz == 1 );
1338
+ UNIT_ASSERT (getResult->Responses [0 ].Status == NKikimrProto::OK);
1339
+
1340
+ NLWTrace::TTraceResponse resp;
1341
+ getResult->Orbit .Serialize (0 , *resp.MutableTrace ());
1342
+ auto & r = resp.GetTrace ();
1343
+ UNIT_ASSERT_VALUES_EQUAL (21 , r.EventsSize ());
1344
+
1345
+ {
1346
+ const auto & p = r.GetEvents (0 );
1347
+ UNIT_ASSERT_VALUES_EQUAL (" BLOBSTORAGE_PROVIDER" , p.GetProvider ());
1348
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyGetHandle" , p.GetName ());
1349
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.ParamsSize ());
1350
+ }
1351
+
1352
+ {
1353
+ const auto & p = r.GetEvents (1 );
1354
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyGetBootstrap" , p.GetName ());
1355
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.ParamsSize ());
1356
+ }
1357
+
1358
+ {
1359
+ const auto & p = r.GetEvents (2 );
1360
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyGetRequest" , p.GetName ());
1361
+ // check groupId
1362
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.GetParams (0 ).GetUintValue ());
1363
+ // check deviceType
1364
+ UNIT_ASSERT_VALUES_EQUAL (" DEVICE_TYPE_UNKNOWN(255)" , p.GetParams (1 ).GetStrValue ());
1365
+ // check handleClass
1366
+ UNIT_ASSERT_VALUES_EQUAL (" FastRead" , p.GetParams (2 ).GetStrValue ());
1367
+ }
1368
+
1369
+ TVector<ui32> vdiskOrderNum = {0 , 1 , 4 , 5 , 6 , 7 };
1370
+ for (auto i = 3 ; i < 9 ; ++i) {
1371
+ const auto & p = r.GetEvents (i);
1372
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyVGetSent" , p.GetName ());
1373
+ // check vdiskId
1374
+ UNIT_ASSERT_VALUES_EQUAL (" [0:_:0:" + ToString (vdiskOrderNum[i-3 ]) + " :0]" , p.GetParams (0 ).GetStrValue ());
1375
+ // check vdiskOrderNum
1376
+ UNIT_ASSERT_VALUES_EQUAL (vdiskOrderNum[i-3 ], p.GetParams (1 ).GetUintValue ());
1377
+ // check vgets count
1378
+ UNIT_ASSERT_VALUES_EQUAL (6 , p.GetParams (2 ).GetUintValue ());
1379
+ }
1380
+
1381
+ for (auto i = 9 ; i < 13 ; ++i) {
1382
+ const auto & p = r.GetEvents (i);
1383
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyVDiskRequestDuration" , p.GetName ());
1384
+ }
1385
+
1386
+ for (auto i = 13 ; i < 15 ; ++i) {
1387
+ const auto & p = r.GetEvents (i);
1388
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyScheduleAccelerate" , p.GetName ());
1389
+ UNIT_ASSERT_VALUES_EQUAL (" Get" , p.GetParams (1 ).GetStrValue ());
1390
+ }
1391
+
1392
+ for (auto i = 15 ; i < 17 ; ++i) {
1393
+ const auto & p = r.GetEvents (i);
1394
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyVDiskRequestDuration" , p.GetName ());
1395
+ }
1396
+
1397
+ {
1398
+ const auto & p = r.GetEvents (17 );
1399
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyStartTransfer" , p.GetName ());
1400
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.ParamsSize ());
1401
+ }
1402
+
1403
+ {
1404
+ const auto & p = r.GetEvents (18 );
1405
+ UNIT_ASSERT_VALUES_EQUAL (" VDiskStartProcessing" , p.GetName ());
1406
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.ParamsSize ());
1407
+ }
1408
+
1409
+ {
1410
+ const auto & p = r.GetEvents (19 );
1411
+ UNIT_ASSERT_VALUES_EQUAL (" VDiskReply" , p.GetName ());
1412
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.ParamsSize ());
1413
+ }
1414
+
1415
+ {
1416
+ const auto & p = r.GetEvents (20 );
1417
+ UNIT_ASSERT_VALUES_EQUAL (" DSProxyGetReply" , p.GetName ());
1418
+ UNIT_ASSERT_VALUES_EQUAL (0 , p.ParamsSize ());
1419
+ }
1420
+ }
1288
1421
1289
1422
} // Y_UNIT_TEST_SUITE TBlobStorageProxySequenceTest
1290
1423
} // namespace NBlobStorageProxySequenceTest
0 commit comments