Skip to content

Commit

Permalink
modify witness ut & fix snapshot interval default value (TuGraph-fami…
Browse files Browse the repository at this point in the history
…ly#389)

* modify witness ut & fix snapshot interval default value

* fix follower retry to start

* fix follower retry to start

* modify ha snapshot interval doc

* modify witness ut

* modify witness ut

* modify witness ut

* modify witness ut

* modify witness ut
  • Loading branch information
lipanpan03 authored Jan 28, 2024
1 parent 9b220ea commit 4fd8b7a
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 76 deletions.
26 changes: 13 additions & 13 deletions docs/en-US/source/5.developer-manual/2.running/2.tugraph-running.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ The parameters and their types are described as follows:
|---------------------------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| directory | string | Directory where data files are stored. If the directory does not exist, it is automatically created. The default directory is /var/lib/lgraph/data. |
| durable | boolean | Whether to enable real-time persistence. Turning off persistence can reduce the disk IO overhead when writing, but data may be lost in extreme cases such as machine power failure. The default value is `true`. |
| host | string | The IP address on which the REST server listens. The default address is 0.0.0.0. Note: In HA mode, the host needs to be set to the IP address of the corresponding server and cannot be set to 0.0.0.0. |
| host | string | The IP address on which the REST server listens. The default address is 0.0.0.0. Note: In HA mode, the host needs to be set to the IP address of the corresponding server and cannot be set to 0.0.0.0. |
| port | int | The Port on which the REST server listens. The default port is 7070. |
| enable_rpc | boolean | Whether to use RPC services. The default value is false. |
| enable_rpc | boolean | Whether to use RPC services. The default value is false. |
| rpc_port | int | Port used by RPC and HA services. The default port number is 9090. |
| enable_ha | boolean | Whether to enable the HA mode. The default value is false. |
| ha_log_dir | string | HA log directory. The HA mode needs to be enabled. The default value is null. |
Expand All @@ -153,29 +153,29 @@ The parameters and their types are described as follows:
| enable_audit_log | boolean | Whether to enable audit logs. The default value is false. |
| audit_log_expire | int | When audit logs are enabled, the validity period (hours) of audit logs is automatically cleared upon timeout. If the value is 0, the logs are not cleared. The default value is 0. |
| audit_log_dir | string | Specifies the directory for storing log files when audit logs are enabled. The default directory is $directory/_audit_log_. |
| load_plugins | boolean | Import all stored procedures when starting the service. The default value is true. |
| optimistic_txn | boolean | Enable optimistic multithreaded write transactions for Cypher. The default is false. |
| disable_auth | boolean | Disable REST authentication. The default is false. |
| ha_snapshot_interval_s | int | Snapshot interval (in seconds) The default value is 86400. |
| load_plugins | boolean | Import all stored procedures when starting the service. The default value is true. |
| optimistic_txn | boolean | Enable optimistic multithreaded write transactions for Cypher. The default is false. |
| disable_auth | boolean | Disable REST authentication. The default is false. |
| ha_snapshot_interval_s | int | Snapshot interval (in seconds). The default value is 604800. -1 means not to automatically generate snapshots. |
| ha_heartbeat_interval_ms | int | Heartbeat interval in milliseconds. The default value is 1000. |
| ha_node_offline_ms | int | The heartbeat times out and the interval (in milliseconds) between nodes going offline. The default value is 60000. |
| ha_node_remove_ms | int | The interval (in milliseconds) at which a node is considered completely dead and removed from the list. The default value is 120000. |
| enable_ip_check | boolean | Allow IP address whitelists. The default value is false。 |
| enable_ip_check | boolean | Allow IP address whitelists. The default value is false。 |
| idle_seconds | int | The maximum number of seconds a child process can be idle. The default value is 600. |
| enable_backup_log | boolean | Whether to enable backup logging. The default value is false. |
| enable_backup_log | boolean | Whether to enable backup logging. The default value is false. |
| backup_log_dir | string | The directory where backup files are stored. The default value is null. |
| snapshot_dir | string | Directory where snapshot files are stored. The default value is null. |
| thread_limit | int | The maximum number of threads that can be used simultaneously. The default value is 0, which means that no restriction is imposed. The license file prevails. |
| unlimited_token | boolean | Whether to set the link token to be infinite. The default value is false and the validity period is 24 hours. |
| reset_admin_password | boolean | Whether to reset the password. The default value is false. When the value is true, the password will be reset to "73@TuGraph"。 |
| enable_fulltext_index | boolean | Whether to enable the full-text index function, the default value is false. |
| unlimited_token | boolean | Whether to set the link token to be infinite. The default value is false and the validity period is 24 hours. |
| reset_admin_password | boolean | Whether to reset the password. The default value is false. When the value is true, the password will be reset to "73@TuGraph"。 |
| enable_fulltext_index | boolean | Whether to enable the full-text index function, the default value is false. |
| fulltext_analyzer | string | Full-text index tokenizer type. Can be set to `StandardAnalyzer` or `SmartChineseAnalyzer`. Default is `StandardAnalyzer` |
| fulltext_commit_interval | int | Full-text index data submission period, for write operations, in seconds. The default is 0, which commits immediately. |
| fulltext_refresh_interval | int | Full-text index data refresh cycle, for read operations, in seconds. The default is 0, and the latest written data can be read immediately. |
| ha_conf | string | Initialize the HA cluster according to host1:port1,host2:port2,host3:port3, the default value is empty. |
| ha_conf | string | Initialize the HA cluster according to host1:port1,host2:port2,host3:port3, the default value is empty. |
| ha_node_join_group_s | int | The waiting time for a node to try to join the high availability cluster, in seconds, the default is 10. |
| ha_bootstrap_role | int | Whether to use bootstrap to start, and the server role to start using this method, 0 means not to use bootstrap to start, 1 means to use bootstrap to start and this node is a leader, 2 means to use bootstrap to start and this node is a follower, only these 3 options. The default value is 0. |
| help | boolean | Print the help message. The default value is false. |
| help | boolean | Print the help message. The default value is false. |

### 4.2.Server configuration file

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ in:

## 4. Generate snapshot

When you need to tell a node generate a snapshot, you can use the `snapshot` command of `lgraph_peer`. An example command is as follows:
For reasons such as setting ha_snapshot_interval_s to -1 when the node starts so that snapshots are not taken by default or other reasons,
when you need to tell a node generate a snapshot, you can use the `snapshot` command of `lgraph_peer`. An example command is as follows:

```shell
$ lgraph_peer --command snapshot --peer {peer_id}
Expand Down
Loading

0 comments on commit 4fd8b7a

Please sign in to comment.