|
29 | 29 |
|
30 | 30 | #include <dynamic_config/variables/YDB_RETRY_BUDGET.hpp> |
31 | 31 |
|
| 32 | +#ifndef ARCADIA_ROOT |
| 33 | +#include "generated/src/ydb/component.yaml.hpp" // Y_IGNORE |
| 34 | +#endif |
| 35 | + |
32 | 36 | USERVER_NAMESPACE_BEGIN |
33 | 37 |
|
34 | 38 | namespace ydb { |
@@ -190,114 +194,7 @@ void YdbComponent::OnConfigUpdate(const dynamic_config::Snapshot& cfg) { |
190 | 194 | } |
191 | 195 |
|
192 | 196 | yaml_config::Schema YdbComponent::GetStaticConfigSchema() { |
193 | | - // TODO remove blocking_task_processor |
194 | | - return yaml_config::MergeSchemas<components::ComponentBase>(R"( |
195 | | -type: object |
196 | | -description: component for YDB |
197 | | -additionalProperties: false |
198 | | -properties: |
199 | | - blocking_task_processor: |
200 | | - type: string |
201 | | - description: deprecated, unused property |
202 | | - credentials-provider: |
203 | | - type: string |
204 | | - description: name of credentials provider component |
205 | | - operation-settings: |
206 | | - type: object |
207 | | - description: default operation settings for requests to the database |
208 | | - additionalProperties: false |
209 | | - properties: |
210 | | - retries: |
211 | | - type: integer |
212 | | - description: default retries count for an operation |
213 | | - defaultDescription: 3 |
214 | | - operation-timeout: |
215 | | - type: string |
216 | | - description: | |
217 | | - default operation timeout in utils::StringToDuration() format |
218 | | - defaultDescription: 1s |
219 | | - cancel-after: |
220 | | - type: string |
221 | | - description: | |
222 | | - cancel operation after specified string in |
223 | | - utils::StringToDuration() format |
224 | | - defaultDescription: 1s |
225 | | - client-timeout: |
226 | | - type: string |
227 | | - description: default client timeout in utils::StringToDuration format |
228 | | - defaultDescription: 1s |
229 | | - get-session-timeout: |
230 | | - type: string |
231 | | - defaultDescription: 5s |
232 | | - description: default session timeout |
233 | | - databases: |
234 | | - type: object |
235 | | - description: per-databases settings |
236 | | - properties: {} |
237 | | - additionalProperties: |
238 | | - type: object |
239 | | - additionalProperties: false |
240 | | - description: single database settings |
241 | | - properties: |
242 | | - endpoint: |
243 | | - type: string |
244 | | - description: gRPC endpoint URL, e.g. grpc://localhost:1234 |
245 | | - database: |
246 | | - type: string |
247 | | - description: full database path, e.g. /ru/service/production/database |
248 | | - credentials: |
249 | | - type: object |
250 | | - properties: {} |
251 | | - additionalProperties: true |
252 | | - description: credentials config passed to credentials provider component |
253 | | - max_pool_size: |
254 | | - type: integer |
255 | | - minimum: 1 |
256 | | - defaultDescription: 50 |
257 | | - description: maximum connection pool size |
258 | | - min_pool_size: |
259 | | - type: integer |
260 | | - minimum: 1 |
261 | | - defaultDescription: 10 |
262 | | - description: minimum connection pool size |
263 | | - get_session_retry_limit: |
264 | | - type: integer |
265 | | - minimum: 0 |
266 | | - defaultDescription: 5 |
267 | | - description: retries count to get session, every attempt with a get-session-timeout |
268 | | - keep-in-query-cache: |
269 | | - type: boolean |
270 | | - defaultDescription: true |
271 | | - description: whether to use query cache |
272 | | - prefer_local_dc: |
273 | | - type: boolean |
274 | | - defaultDescription: true |
275 | | - description: prefer making requests to local data center |
276 | | - sync_start: |
277 | | - type: boolean |
278 | | - defaultDescription: true |
279 | | - description: fail to boot if YDB is not available |
280 | | - aliases: |
281 | | - description: list of aliases for this database |
282 | | - type: array |
283 | | - items: |
284 | | - type: string |
285 | | - description: alias name |
286 | | - by-database-timings-buckets-ms: |
287 | | - type: array |
288 | | - description: histogram bounds for by-database timing metrics |
289 | | - defaultDescription: 40 buckets with +20% increment per step |
290 | | - items: |
291 | | - type: number |
292 | | - description: upper bound for an individual bucket |
293 | | - by-query-timings-buckets-ms: |
294 | | - type: array |
295 | | - description: histogram bounds for by-query timing metrics |
296 | | - defaultDescription: 15 buckets with +100% increment per step |
297 | | - items: |
298 | | - type: number |
299 | | - description: upper bound for an individual bucket |
300 | | -)"); |
| 197 | + return yaml_config::MergeSchemasFromResource<components::ComponentBase>("src/ydb/component.yaml"); |
301 | 198 | } |
302 | 199 |
|
303 | 200 | void YdbComponent::WriteStatistics(utils::statistics::Writer& writer) const { |
|
0 commit comments