|
11 | 11 |
|
12 | 12 | #include <ydb/impl/dist_lock/semaphore_settings.hpp> |
13 | 13 |
|
| 14 | +#ifndef ARCADIA_ROOT |
| 15 | +#include "generated/src/ydb/dist_lock/component_base.yaml.hpp" // Y_IGNORE |
| 16 | +#endif |
| 17 | + |
14 | 18 | USERVER_NAMESPACE_BEGIN |
15 | 19 |
|
16 | 20 | namespace ydb { |
@@ -136,66 +140,7 @@ void DistLockComponentBase::Start() { |
136 | 140 | void DistLockComponentBase::Stop() noexcept { worker_->Stop(); } |
137 | 141 |
|
138 | 142 | yaml_config::Schema DistLockComponentBase::GetStaticConfigSchema() { |
139 | | - return yaml_config::MergeSchemas<components::ComponentBase>(R"( |
140 | | -type: object |
141 | | -description: YDB distlock component |
142 | | -additionalProperties: false |
143 | | -properties: |
144 | | - semaphore-name: |
145 | | - type: string |
146 | | - description: name of the semaphore within the coordination node |
147 | | - database-settings: |
148 | | - type: object |
149 | | - description: settings that might be used for a group of related distlock instances |
150 | | - additionalProperties: false |
151 | | - properties: |
152 | | - dbname: |
153 | | - type: string |
154 | | - description: the key of the database within ydb component (NOT the actual database path) |
155 | | - coordination-node: |
156 | | - type: string |
157 | | - description: name of the coordination node within the database |
158 | | - initial-setup: |
159 | | - type: boolean |
160 | | - description: if true, then create the coordination node and the semaphore unless they already exist |
161 | | - defaultDescription: true |
162 | | - task-processor: |
163 | | - type: string |
164 | | - description: the name of the TaskProcessor for running DoWork |
165 | | - defaultDescription: the default TaskProcessor, typically main-task-processor |
166 | | - node-settings: |
167 | | - type: object |
168 | | - description: settings for coordination node creation |
169 | | - additionalProperties: false |
170 | | - properties: |
171 | | - session-grace-period: |
172 | | - type: string |
173 | | - description: | |
174 | | - the time after which the lock will be given to another host |
175 | | - after a network failure; this timer starts |
176 | | - on the coordination node conceptually at the same time |
177 | | - as 'session-timeout' timer starts on the service instance |
178 | | - session-timeout: |
179 | | - type: string |
180 | | - description: for how long we will try to restore session after a network failure before dropping it |
181 | | - defaultDescription: 5s |
182 | | - restart-session-delay: |
183 | | - type: string |
184 | | - description: backoff before attempting to reconnect session after it returns "permanent failure" |
185 | | - defaultDescription: 1s |
186 | | - acquire-interval: |
187 | | - type: string |
188 | | - description: backoff before repeating a failed Acquire call |
189 | | - defaultDescription: 100ms |
190 | | - restart-delay: |
191 | | - type: string |
192 | | - description: backoff before calling DoWork again after it returns or throws |
193 | | - defaultDescription: 100ms |
194 | | - cancel-task-time-limit: |
195 | | - type: string |
196 | | - description: time, within which a cancelled DoWork is expected to finish |
197 | | - defaultDescription: 5s |
198 | | - )"); |
| 143 | + return yaml_config::MergeSchemasFromResource<components::ComponentBase>("src/ydb/dist_lock/component_base.yaml"); |
199 | 144 | } |
200 | 145 |
|
201 | 146 | } // namespace ydb |
|
0 commit comments