2011-10-31 06:37:12 +00:00
|
|
|
#pragma once
|
2010-05-21 19:52:50 +00:00
|
|
|
|
2021-10-02 07:13:14 +00:00
|
|
|
#include <base/defines.h>
|
2020-03-19 10:38:34 +00:00
|
|
|
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DBMS_DEFAULT_PORT 9000
|
2017-09-29 16:58:04 +00:00
|
|
|
#define DBMS_DEFAULT_SECURE_PORT 9440
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DBMS_DEFAULT_CONNECT_TIMEOUT_SEC 10
|
|
|
|
#define DBMS_DEFAULT_SEND_TIMEOUT_SEC 300
|
|
|
|
#define DBMS_DEFAULT_RECEIVE_TIMEOUT_SEC 300
|
2017-04-19 18:29:50 +00:00
|
|
|
/// Timeout for synchronous request-result protocol call (like Ping or TablesStatus).
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DBMS_DEFAULT_SYNC_REQUEST_TIMEOUT_SEC 5
|
|
|
|
#define DBMS_DEFAULT_POLL_INTERVAL 10
|
2012-07-06 18:12:52 +00:00
|
|
|
|
2017-04-30 13:50:16 +00:00
|
|
|
/// The size of the I/O buffer by default.
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DBMS_DEFAULT_BUFFER_SIZE 1048576ULL
|
2015-04-12 04:39:20 +00:00
|
|
|
|
2017-04-30 13:50:16 +00:00
|
|
|
/** Which blocks by default read the data (by number of rows).
|
2017-05-09 19:07:35 +00:00
|
|
|
* Smaller values give better cache locality, less consumption of RAM, but more overhead to process the query.
|
2014-04-29 20:22:57 +00:00
|
|
|
*/
|
2020-07-12 01:05:09 +00:00
|
|
|
#define DEFAULT_BLOCK_SIZE 65505 /// 65536 minus 16 + 15 bytes padding that we usually have in arrays
|
2014-04-29 20:22:57 +00:00
|
|
|
|
2017-04-30 13:50:16 +00:00
|
|
|
/** Which blocks should be formed for insertion into the table, if we control the formation of blocks.
|
|
|
|
* (Sometimes the blocks are inserted exactly such blocks that have been read / transmitted from the outside, and this parameter does not affect their size.)
|
|
|
|
* More than DEFAULT_BLOCK_SIZE, because in some tables a block of data on the disk is created for each block (quite a big thing),
|
|
|
|
* and if the parts were small, then it would be costly then to combine them.
|
2014-04-29 20:22:57 +00:00
|
|
|
*/
|
2020-07-12 01:05:09 +00:00
|
|
|
#define DEFAULT_INSERT_BLOCK_SIZE 1048545 /// 1048576 minus 16 + 15 bytes padding that we usually have in arrays
|
2014-04-29 20:22:57 +00:00
|
|
|
|
2017-04-30 13:50:16 +00:00
|
|
|
/** The same, but for merge operations. Less DEFAULT_BLOCK_SIZE for saving RAM (since all the columns are read).
|
|
|
|
* Significantly less, since there are 10-way mergers.
|
2014-04-29 20:22:57 +00:00
|
|
|
*/
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DEFAULT_MERGE_BLOCK_SIZE 8192
|
|
|
|
|
2019-05-28 21:17:48 +00:00
|
|
|
#define DEFAULT_TEMPORARY_LIVE_VIEW_TIMEOUT_SEC 5
|
2020-09-14 19:39:33 +00:00
|
|
|
#define DEFAULT_PERIODIC_LIVE_VIEW_REFRESH_SEC 60
|
2017-09-01 17:21:03 +00:00
|
|
|
#define SHOW_CHARS_ON_SYNTAX_ERROR ptrdiff_t(160)
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DBMS_CONNECTION_POOL_WITH_FAILOVER_DEFAULT_MAX_TRIES 3
|
2017-04-30 13:50:16 +00:00
|
|
|
/// each period reduces the error counter by 2 times
|
|
|
|
/// too short a period can cause errors to disappear immediately after creation.
|
2019-08-06 04:36:38 +00:00
|
|
|
#define DBMS_CONNECTION_POOL_WITH_FAILOVER_DEFAULT_DECREASE_ERROR_PERIOD 60
|
2019-08-23 05:04:45 +00:00
|
|
|
/// replica error max cap, this is to prevent replica from accumulating too many errors and taking to long to recover.
|
2019-08-06 04:36:38 +00:00
|
|
|
#define DBMS_CONNECTION_POOL_WITH_FAILOVER_MAX_ERROR_COUNT 1000
|
2012-08-26 11:14:52 +00:00
|
|
|
|
2017-04-30 13:50:16 +00:00
|
|
|
/// The boundary on which the blocks for asynchronous file operations should be aligned.
|
2017-05-26 15:30:07 +00:00
|
|
|
#define DEFAULT_AIO_FILE_BLOCK_SIZE 4096
|
2015-03-12 16:22:49 +00:00
|
|
|
|
2017-12-27 17:58:52 +00:00
|
|
|
#define DEFAULT_HTTP_READ_BUFFER_TIMEOUT 1800
|
|
|
|
#define DEFAULT_HTTP_READ_BUFFER_CONNECTION_TIMEOUT 1
|
2021-10-03 09:38:04 +00:00
|
|
|
/// Maximum number of http-connections between two endpoints
|
2018-11-20 13:15:44 +00:00
|
|
|
/// the number is unmotivated
|
2018-11-16 13:33:43 +00:00
|
|
|
#define DEFAULT_COUNT_OF_HTTP_CONNECTIONS_PER_ENDPOINT 15
|
2017-12-27 17:58:52 +00:00
|
|
|
|
2018-11-27 16:11:46 +00:00
|
|
|
#define DBMS_DEFAULT_PATH "/var/lib/clickhouse/"
|
2017-12-27 17:58:52 +00:00
|
|
|
|
2020-04-09 18:10:27 +00:00
|
|
|
/// Actually, there may be multiple acquisitions of different locks for a given table within one query.
|
|
|
|
/// Check with IStorage class for the list of possible locks
|
|
|
|
#define DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC 120
|
2020-04-15 20:28:05 +00:00
|
|
|
|
|
|
|
/// Default limit on recursion depth of recursive descend parser.
|
|
|
|
#define DBMS_DEFAULT_MAX_PARSER_DEPTH 1000
|
2020-04-20 02:31:21 +00:00
|
|
|
|
2021-09-09 09:37:51 +00:00
|
|
|
/// Default limit on query size.
|
|
|
|
#define DBMS_DEFAULT_MAX_QUERY_SIZE 262144
|
|
|
|
|
2020-04-20 02:31:21 +00:00
|
|
|
/// Max depth of hierarchical dictionary
|
|
|
|
#define DBMS_HIERARCHICAL_DICTIONARY_MAX_DEPTH 1000
|