Local configuration
The following table describes the parameters stored in the local file conf/conf.json.
| Parameter | Default value | Description |
|---|---|---|
| service_port | 2983 | The service listening port. |
| max_packet_bytes | 67108864 | The maximum number of bytes allowed for a packet. |
| record_queue_size | 20000 | The size of the data sending queue. |
| read_timeout_us | 2000000 | The waiting period of each batch of data reading queues. Unit: microseconds. |
| read_fail_interval_us | 1000000 | The waiting period for retrying each data reading queue. Unit: microseconds. |
| read_wait_num | 20000 | The number of data reading queues in a waiting batch. |
| send_timeout_us | 2000000 | The timeout period for sending a packet. Unit: microseconds. |
| send_fail_interval_us | 1000000 | The waiting period for the retry of a failed packet-sending task. Unit: microseconds. |
| command_timeout_s | 10 | The timeout period of command execution. Unit: microseconds. |
| log_quota_size_mb | 5120 | The maximum size of all log files. Unit: MB. |
| log_quota_day | 7 | The maximum log file retention period. Unit: days. |
| log_gc_interval_s | 43200 | The interval for purging log files. Unit: seconds. |
| log_level | 2 | The log level. Valid values in ascending order: 0 (TRACE), 1 (DEBUG), 2 (INFO), 3 (WARN), 4 (ERROR), and 5 (CRITICAL). |
| log_flush_strategy | 1 | The log flushing strategy. Valid values: 0 (flushing by log level) and 1 (flushing by time interval). |
| log_flush_level | 2 | The log flushing level. |
| log_flush_period_s | 1 | The interval for log flushing. Unit: seconds. |
| log_max_file_size_mb | 1024 | The maximum size of the logproxy.log file of the main process before log rotation. Unit: MB. |
| log_retention_h | 360 | The retention period of the logproxy.log file of the main process. Unit: hours. |
| allow_all_tenant | true | Specifies whether to allow subscription to all tenants. |
| ob_sys_username | "" | The username of the sys tenant in ciphertext. |
| ob_sys_password | "" | The password of the sys tenant in ciphertext. |
| counter_interval_s | 2 | The counting cycle of the counter. Unit: seconds. |
| metric_enable | true | Specifies whether to enable collection of metric data, such as the consumption of CPU, memory, and network resources. |
| metric_interval_s | 10 | The interval for metric data collection. |
| prometheus_port | 2984 | The listening port of Prometheus. |
| debug | false | Specifies whether to print debugging information. |
| verbose | false | Specifies whether to print details. |
| verbose_packet | false | Specifies whether to print packet details. |
| verbose_record_read | false | Specifies whether to print record reading details. |
| count_record | false | Specifies whether to count the number of records. |
| binlog_log_bin_basename | ./run | The default path where the generated binlog files are stored. |
| binlog_obcdc_ce_path_template | ../../obcdc/obcdc-ce-%s.x-access/libobcdcaccess.so | The path of the obcdc library that the binlog service depends on. |
| binlog_ignore_unsupported_event | true | Specifies whether to ignore events that do not support conversion. |
| binlog_max_event_buffer_bytes | 67108864 | The buffer size for binlog event conversion. |
| binlog_mode | false | Specifies whether to enable the binlog mode. |
| binlog_nof_work_threads | 16 | The size of the thread pool for requests that are not scheduled by binlog converter (BC), such as executing the SHOW BINARY LOGS statement to view the list of binlog files. |
| binlog_bc_work_threads | 2 | The size of the thread pool for requests that are scheduled by BC. |
| binlog_max_file_size_bytes | 536870912 | The maximum size of a single binlog file. |
| binlog_convert_timeout_us | 10000 | The timeout period for binlog conversion. Unit: microseconds. |
| binlog_checksum | true | Specifies whether to enable the binlog checksum. |
| binlog_heartbeat_interval_us | 1000000 | The interval for sending binlog heartbeat events. Unit: microseconds. |
| binlog_gtid_display | true | Specifies whether to display the global transaction identifier (GTID) information. |
| binlog_ddl_convert | true | Specifies whether to enable DDL statement conversion. If this parameter is set to true, the extended syntax of OceanBase Database is discarded. |
| binlog_ddl_convert_ignore_unsupported_ddl | true | Specifies whether to ignore DDL statements that do not support conversion. |
| binlog_memory_limit | 3G | The binlog memory limit. Default value: 3G. |
| binlog_working_mode | storage | The binlog working mode, which corresponds to the working_mode parameter in obcdc. Default value: storage. |
| binlog_recover_backup | true | Specifies whether to enable binlog backup and restore. |
| start_tcp_port | 8100 | The start value of the port occupied by the binlog instance. |
| reserved_ports_num | 256 | The number of reserved ports. |
| gtid_seq_compressed_interval_s | 256 | The compression interval of the GTID sequence. Unit: seconds. |
| gtid_seq_compressed_trx_size | 100000 | The transaction size in the GTID sequence. |
| gtid_inspector_s | true | The inspection interval for GTID consistency. |
| database_ip | The IP address of the MetaDB. | |
| database_port | The port number of the MetaDB. | |
| database_name | The name of the MetaDB. | |
| user | The username for accessing to the MetaDB. | |
| password | The password for accessing the MetaDB. | |
| node_ip | The IP address of the OBServer node. | |
| enable_resource_check | true | Specifies whether to enable resource check. |
| node_cpu_limit_threshold_percent | 80 | The threshold of CPU utilization. |
| node_mem_limit_threshold_percent | 85 | The threshold of memory usage. |
| node_disk_limit_threshold_percent | 70 | The threshold of disk usage. |
| recovery_point_strategy | fast | The restore strategy used when an OBI instance fails over to a different binlog server node. |
| enable_dumper_interception | false | Specifies whether to enable subscription interception. |
| max_dumper_num | 128 | The maximum number of subscriptions for an OBI instance. |
MetaDB configurations
The following table lists the tables contained in the MetaDB.
| Table name | Stored data |
|---|---|
| binlog_instances | The information of all binlog instances. |
| config_template | The parameters, which correspond to those stored in the local file conf.json. |
| instances_gtid_seq | The GTID records of all binlog instances. |
| nodes | The information of all binlog server nodes. |
| primary_instance | The basic information of all primary binlog instances. |
| tasks | The records of operations on binlog instances. Valid values: 0 (create), 1 (delete), 2 (stop), 3 (start), and 4 (restore). |
| user | The account username and account password for component authentication. |
Generally, you only need to modify the config_template table in the preceding table list.
The following table describes the parameters in the config_template table.
Note
The value in the
config_templatetable is used if it is different from that stored in the local fileconfig_template.For parameters of the Boolean type in the following table, the value
0indicatesfalseand the value1indicatestrue.
| Parameter | Default value | Description |
|---|---|---|
| binlog_expire_logs_seconds | 259200 | The validity period of binlog files. Unit: seconds. |
| binlog_expire_logs_size | 53687091200 | The threshold size for purging expired binlog files. Unit: bytes. |
| auto_start_obcdc | 1 | Specifies whether to automatically start obcdc for log pulling after the binlog instance is started. |
| active_state_after_boot | 0 | Specifies whether the binlog instance is active to provide services after it is started. |
| failover | 1 | Specifies whether to enable fault recovery for the binlog instance. If this parameter is set to true, the binlog instance is automatically recovered after it fails on a normal node. |
| binlog_gtid_display | true | Specifies whether to display the GTID information. |
| binlog_ddl_convert | true | Specifies whether to enable DDL statement conversion. If this parameter is set to true, the superset syntax of OceanBase Database is discarded. |
| binlog_memory_limit | 4G | The threshold of memory usage for obcdc, which corresponds to the memory_limit parameter in obcdc. |
| binlog_working_mode | storage | The obcdc working mode, which corresponds to the working_mode parameter in obcdc. |
| binlog_recover_backup | true | Specifies whether to enable binlog backup and restore. |
| gtid_seq_compressed_interval_s | 10 | The compression interval of the GTID sequence. Unit: seconds. |
| gtid_seq_compressed_trx_size | 100000 | The transaction size in the GTID sequence. |
| gtid_marking_step_size | 100000 | The increment used for generating GTIDs. |
| gtid_inspector_s | 900 | The inspection interval for GTID consistency. Unit: seconds. |
| gtid_memory_cache_seconds | 7200 | The cache duration for GTIDs in memory. Unit: seconds. |
| gtid_seq_compressed_interval_s | 3600 | The heartbeat interval for GTIDs. Unit: seconds. |
| recovery_point_strategy | fast | The restore strategy used when an OBI instance fails over to a different binlog server node. |
| max_binlog_size | 536870912 | The maximum size of a single binlog file. Unit: bytes. |
| binlog_log_heartbeat_interval_times | 10 | The number of heartbeat events between binlog heartbeat entries. A heartbeat entry is written to the binlog after this many heartbeat events occur. |
| verbose_record_read | false | Specifies whether to print record reading details. |
| binlog_ignore_unsupported_event | true | Specifies whether to ignore events that do not support conversion. |
| binlog_max_event_buffer_bytes | 67108864 | The buffer size for binlog event conversion. |
| binlog_convert_timeout_us | 10000 | The timeout period for binlog conversion. Unit: microseconds. |
| enable_resource_check | true | Specifies whether to enable resource check. |
| node_cpu_limit_threshold_percent | 80 | The threshold of CPU utilization. Unit: percentage. |
| node_mem_limit_threshold_percent | 85 | The threshold of memory usage. Unit: percentage. |
| node_disk_limit_threshold_percent | 70 | The threshold of disk usage. Unit: percentage. |
| enable_dumper_interception | false | Specifies whether to enable subscription interception. |
| max_dumper_num | 128 | The maximum number of subscriptions for an OBI instance. |
| default_instance_replicate_num | 1 | The default number of replicas when creating an OBI instance. |
| max_task_execution_time_s | 600 | The maximum execution time of the task. Unit: seconds. |
| default_defer_drop_sec | 0 | |
| binlog_ddl_convert_ignore_unsupported_ddl | true | Specifies whether to ignore DDL statements that do not support conversion. |
| prometheus_unused_metric_clear_interval_s | 900 | The interval for purging unused metrics. Unit: seconds. |
| enable_auth | false | Specifies whether to enable authentication between the OBM and the OBI instance. |
You can execute an SQL statement to modify the preceding parameters. For example, you can execute the following statement to disable enable_resource_check:
UPDATE config_template SET value='false' WHERE key_name='enable_resource_check';
After you modify the parameter, restart the binlog server node for the new configurations to take effect.
# Restart without using supervisord
./run.sh stop
./run.sh start
# Restart by using supervisord
supervisorctl restart binlog
Note
The restart does not affect the running binlog instances.