Skip to content

Commit b3c5ca2

Browse files
committed
CR1
1 parent ff1c76c commit b3c5ca2

20 files changed

Lines changed: 87 additions & 49 deletions

File tree

cloud/filestore/config/filesystem.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ message TFileSystemConfig
4040
// Async processing of destroy handle requests.
4141
optional bool AsyncDestroyHandleEnabled = 11;
4242

43-
// Period of processing create/destroy handle requests.
44-
optional uint32 AsyncHandleOperationPeriod = 12;
43+
// Polling period when the async handle operations queue is empty.
44+
optional uint32 AsyncHandleOperationIdlePeriod = 12;
4545

4646
// Enable O_DIRECT when working with files
4747
optional bool DirectIoEnabled = 13;
@@ -127,4 +127,7 @@ message TFileSystemConfig
127127

128128
// Async processing of read-only create handle requests.
129129
optional bool AsyncCreateHandleEnabled = 37;
130+
131+
// Delay between processing entries in the async handle operations queue.
132+
optional uint32 AsyncHandleOperationDrainPeriod = 38;
130133
}

cloud/filestore/config/server.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ message TLocalServiceConfig
145145
// Async processing of destroy handle requests
146146
optional bool AsyncDestroyHandleEnabled = 12;
147147

148-
// Period of processing create/destroy handle requests
149-
optional uint32 AsyncHandleOperationPeriod = 13;
148+
// Polling period when the async handle operations queue is empty.
149+
optional uint32 AsyncHandleOperationIdlePeriod = 13;
150150

151151
// Use open_by_handle_at to lookup nodes
152152
optional bool OpenNodeByHandleEnabled = 14;
@@ -234,6 +234,9 @@ message TLocalServiceConfig
234234

235235
// Async processing of destroy handle requests only for read only handles.
236236
optional bool AsyncDestroyReadOnlyHandleEnabled = 42;
237+
238+
// Delay between processing entries in the async handle operations queue.
239+
optional uint32 AsyncHandleOperationDrainPeriod = 43;
237240
}
238241

239242
////////////////////////////////////////////////////////////////////////////////

cloud/filestore/config/storage.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,8 @@ message TStorageConfig
400400
// Async processing of destroy handle requests.
401401
optional bool AsyncDestroyHandleEnabled = 379;
402402

403-
// Period of processing create/destroy handle requests.
404-
optional uint32 AsyncHandleOperationPeriod = 380;
403+
// Polling period when the async handle operations queue is empty.
404+
optional uint32 AsyncHandleOperationIdlePeriod = 380;
405405

406406
// Dynamic node registration params.
407407
optional uint32 NodeRegistrationMaxAttempts = 381;
@@ -896,4 +896,7 @@ message TStorageConfig
896896

897897
// Sets the time after which latency of a node + request tuple will decrease by half.
898898
optional uint32 NodeLatencyHalfLife = 538; // measured in ms
899+
900+
// Delay between processing entries in the async handle operations queue.
901+
optional uint32 AsyncHandleOperationDrainPeriod = 539;
899902
}

cloud/filestore/libs/service_local/config.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ namespace {
2929
xxx(GuestWriteBackCacheEnabled, bool, false )\
3030
xxx(AsyncDestroyHandleEnabled, bool, false )\
3131
xxx(AsyncDestroyReadOnlyHandleEnabled, bool, false )\
32-
xxx(AsyncHandleOperationPeriod, TDuration, 0ms )\
32+
xxx(AsyncHandleOperationIdlePeriod, TDuration, 50ms )\
33+
xxx(AsyncHandleOperationDrainPeriod, TDuration, 0ms )\
3334
xxx(OpenNodeByHandleEnabled, bool, false )\
3435
xxx(NodeCleanupBatchSize, ui32, 1000 )\
3536
xxx(ZeroCopyEnabled, bool, false )\

cloud/filestore/libs/service_local/config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ class TLocalFileStoreConfig
107107

108108
bool GetAsyncDestroyHandleEnabled() const;
109109
bool GetAsyncDestroyReadOnlyHandleEnabled() const;
110-
TDuration GetAsyncHandleOperationPeriod() const;
110+
TDuration GetAsyncHandleOperationIdlePeriod() const;
111+
TDuration GetAsyncHandleOperationDrainPeriod() const;
111112

112113
bool GetOpenNodeByHandleEnabled() const;
113114

cloud/filestore/libs/service_local/fs_session.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ NProto::TCreateSessionResponse TLocalFileSystem::CreateSession(
4343
Config->GetAsyncDestroyHandleEnabled());
4444
features->SetAsyncDestroyReadOnlyHandleEnabled(
4545
Config->GetAsyncDestroyReadOnlyHandleEnabled());
46-
features->SetAsyncHandleOperationPeriod(
47-
Config->GetAsyncHandleOperationPeriod().MilliSeconds());
46+
features->SetAsyncHandleOperationIdlePeriod(
47+
Config->GetAsyncHandleOperationIdlePeriod().MilliSeconds());
48+
features->SetAsyncHandleOperationDrainPeriod(
49+
Config->GetAsyncHandleOperationDrainPeriod().MilliSeconds());
4850
// The local service publishes only the legacy ZeroCopyEnabled feature,
4951
// which the FUSE config translates into both ZeroCopyReadEnabled and
5052
// ZeroCopyWriteEnabled (see BuildFileSystemConfig in vfs_fuse/loop.cpp).

cloud/filestore/libs/storage/core/config.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ using TAliases = NProto::TStorageConfig::TFilestoreAliases;
264264
xxx(AsyncCreateHandleEnabled, bool, false )\
265265
xxx(TabletUnsafeAsyncReadOnlyCreateHandleEnabled, bool, false )\
266266
xxx(TabletUnsafeAsyncDestroyHandleEnabled, bool, false )\
267-
xxx(AsyncHandleOperationPeriod, TDuration, TDuration::Zero() )\
267+
xxx(AsyncHandleOperationIdlePeriod, \
268+
TDuration, TDuration::MilliSeconds(50))\
269+
xxx(AsyncHandleOperationDrainPeriod, \
270+
TDuration, TDuration::Zero() )\
268271
xxx(UnconfirmedCreateHandleGraceTimeout, \
269272
TDuration, TDuration::Minutes(2) )\
270273
\

cloud/filestore/libs/storage/core/config.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ class TStorageConfig
277277
bool GetAsyncCreateHandleEnabled() const;
278278
bool GetTabletUnsafeAsyncReadOnlyCreateHandleEnabled() const;
279279
bool GetTabletUnsafeAsyncDestroyHandleEnabled() const;
280-
TDuration GetAsyncHandleOperationPeriod() const;
280+
TDuration GetAsyncHandleOperationIdlePeriod() const;
281+
TDuration GetAsyncHandleOperationDrainPeriod() const;
281282
TDuration GetUnconfirmedCreateHandleGraceTimeout() const;
282283

283284
void Dump(IOutputStream& out) const;

cloud/filestore/libs/storage/tablet/tablet_actor_createsession.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ void FillFeatures(
5252
config.GetAsyncDestroyReadOnlyHandleEnabled());
5353
features->SetAsyncCreateHandleEnabled(
5454
config.GetAsyncCreateHandleEnabled());
55-
features->SetAsyncHandleOperationPeriod(
56-
config.GetAsyncHandleOperationPeriod().MilliSeconds());
55+
features->SetAsyncHandleOperationIdlePeriod(
56+
config.GetAsyncHandleOperationIdlePeriod().MilliSeconds());
57+
features->SetAsyncHandleOperationDrainPeriod(
58+
config.GetAsyncHandleOperationDrainPeriod().MilliSeconds());
5759

5860
features->SetGuestWriteBackCacheEnabled(
5961
config.GetGuestWriteBackCacheEnabled());

cloud/filestore/libs/storage/tablet/tablet_ut_sessions.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,8 @@ Y_UNIT_TEST_SUITE(TIndexTabletTest_Sessions)
14231423
features.SetHasXAttrs(true);
14241424
features.SetMaxFuseLoopThreads(1);
14251425
features.SetTabletDirectRdmaEnabled(false);
1426+
features.SetAsyncHandleOperationIdlePeriod(
1427+
TDuration::MilliSeconds(50).MilliSeconds());
14261428

14271429
DoTestShouldReturnFeaturesInCreateSessionResponse(config, features);
14281430

@@ -1436,8 +1438,10 @@ Y_UNIT_TEST_SUITE(TIndexTabletTest_Sessions)
14361438
config.SetPreferredBlockSizeMultiplier(2);
14371439
config.SetAsyncDestroyHandleEnabled(true);
14381440
config.SetAsyncDestroyReadOnlyHandleEnabled(true);
1439-
config.SetAsyncHandleOperationPeriod(
1441+
config.SetAsyncHandleOperationIdlePeriod(
14401442
TDuration::MilliSeconds(100).MilliSeconds());
1443+
config.SetAsyncHandleOperationDrainPeriod(
1444+
TDuration::MilliSeconds(10).MilliSeconds());
14411445
config.SetGuestPageCacheDisabled(true);
14421446
config.SetExtendedAttributesDisabled(true);
14431447
config.SetServerWriteBackCacheEnabled(true);
@@ -1468,8 +1472,10 @@ Y_UNIT_TEST_SUITE(TIndexTabletTest_Sessions)
14681472
features.SetPreferredBlockSize(4_KB * 2);
14691473
features.SetAsyncDestroyHandleEnabled(true);
14701474
features.SetAsyncDestroyReadOnlyHandleEnabled(true);
1471-
features.SetAsyncHandleOperationPeriod(
1475+
features.SetAsyncHandleOperationIdlePeriod(
14721476
TDuration::MilliSeconds(100).MilliSeconds());
1477+
features.SetAsyncHandleOperationDrainPeriod(
1478+
TDuration::MilliSeconds(10).MilliSeconds());
14731479
features.SetGuestPageCacheDisabled(true);
14741480
features.SetExtendedAttributesDisabled(true);
14751481
features.SetServerWriteBackCacheEnabled(true);

0 commit comments

Comments
 (0)