@@ -60,10 +60,12 @@ TPDisk::TPDisk(std::shared_ptr<TPDiskCtx> pCtx, const TIntrusivePtr<TPDiskConfig
60
60
0 , 64 * 1024 * 1024 );
61
61
ForsetiMaxLogBatchNs = TControlWrapper ((PDiskCategory.IsSolidState () ? 50'000ll : 500'000ll ), 0 , 100'000'000ll );
62
62
ForsetiMaxLogBatchNsCached = ForsetiMaxLogBatchNs;
63
- ForsetiOpPieceSizeSsd = TControlWrapper (64 * 1024 , 1 , 512 * 1024 );
64
- ForsetiOpPieceSizeRot = TControlWrapper (512 * 1024 , 1 , 512 * 1024 );
63
+ ForsetiOpPieceSizeSsd = TControlWrapper (64 * 1024 , 1 , Cfg-> BufferPoolBufferSizeBytes );
64
+ ForsetiOpPieceSizeRot = TControlWrapper (512 * 1024 , 1 , Cfg-> BufferPoolBufferSizeBytes );
65
65
ForsetiOpPieceSizeCached = PDiskCategory.IsSolidState () ? ForsetiOpPieceSizeSsd : ForsetiOpPieceSizeRot;
66
66
67
+
68
+
67
69
if (Cfg->SectorMap ) {
68
70
auto diskModeParams = Cfg->SectorMap ->GetDiskModeParams ();
69
71
if (diskModeParams) {
@@ -3419,12 +3421,12 @@ void TPDisk::Update() {
3419
3421
Mon.UpdateDurationTracker .UpdateStarted ();
3420
3422
LWTRACK (PDiskUpdateStarted, UpdateCycleOrbit, PCtx->PDiskId );
3421
3423
3424
+ ForsetiMaxLogBatchNsCached = ForsetiMaxLogBatchNs;
3425
+ ForsetiOpPieceSizeCached = PDiskCategory.IsSolidState () ? ForsetiOpPieceSizeSsd : ForsetiOpPieceSizeRot;
3426
+ ForsetiOpPieceSizeCached = Min<i64 >(ForsetiOpPieceSizeCached, Cfg->BufferPoolBufferSizeBytes );
3427
+ ForsetiOpPieceSizeCached = AlignDown<i64 >(ForsetiOpPieceSizeCached, Format.SectorSize );
3422
3428
{
3423
3429
TGuard<TMutex> guard (StateMutex);
3424
- ForsetiMaxLogBatchNsCached = ForsetiMaxLogBatchNs;
3425
- ForsetiOpPieceSizeCached = PDiskCategory.IsSolidState () ? ForsetiOpPieceSizeSsd : ForsetiOpPieceSizeRot;
3426
- ForsetiOpPieceSizeCached = Min<i64 >(ForsetiOpPieceSizeCached, Cfg->BufferPoolBufferSizeBytes );
3427
- ForsetiOpPieceSizeCached = AlignDown<i64 >(ForsetiOpPieceSizeCached, Format.SectorSize );
3428
3430
// Switch the scheduler when possible
3429
3431
ForsetiScheduler.SetIsBinLogEnabled (EnableForsetiBinLog);
3430
3432
0 commit comments