DEV Community

AntDB
AntDB

Posted on

Manager Handbook for Distributed AntDB-T - P17

Modify parameters

The global parameters ofdoctor are modified by the commandset doctor, and the meaning of the parameters is as follows:

• enable: General switch, 1 is on, 0 is off. The default is 0.

• forceswitch: Whether to force the switch on the abnormal node, 1 is yes, 0 is no, default is 0.

• switchinterval: The longest time to self-heal again after the last self-healing failure, default is 30s.

• nodedeadline: The longest time to self-heal after node failure, default is 30s.

• agentdeadline: The maximum time for self-healing after agent process failure, default is 5s.

The command to modify the parameters is as follows:

set doctor (switchinterval=10);  
set doctor (nodedeadline=10);  
set doctor (forceswitch=1);  
Enter fullscreen mode Exit fullscreen mode

After the modification is completed, check whether it takes effect:

postgres=# list doctor;  
 type  |  subtype  |  key  | value |  comment   
-----------+-----------------+----------------+-------+--------------------------------------------------------------------------------------------------------------  
 PARAMETER | --  | enable  | 1  | 0:false, 1:true. If true, doctor processes will be launched, or else, doctor processes exit.  
 PARAMETER | --  | forceswitch  | 1  | 0:false, 1:true. Whether force to switch the master/slave, note that force switch may cause data loss.  
 PARAMETER | --  | switchinterval | 10  | In seconds, The time interval for doctor retry the switching if an error occurred in the previous switching.  
 PARAMETER | --  | nodedeadline  | 10  | In seconds. The maximum time for doctor tolerate a NODE running abnormally.  
 PARAMETER | --  | agentdeadline  | 5  | In seconds. The maximum time for doctor tolerate a AGENT running abnormally.  
 NODE  | gtmcoord master | gcn1  | t  | enable doctor  
 NODE  | gtmcoord slave  | gcn2  | t  | enable doctor  
 NODE  | coordinator  | cn1  | t  | enable doctor  
 NODE  | coordinator  | cn2  | t  | enable doctor  
 NODE  | coordinator  | cn3  | t  | enable doctor  
 NODE  | datanode master | dn1_1  | t  | enable doctor  
 NODE  | datanode master | dn2_1  | t  | enable doctor  
 NODE  | datanode master | dn3_1  | t  | enable doctor  
 NODE  | datanode slave  | dn1_2  | t  | enable doctor  
 NODE  | datanode slave  | dn1_3  | t  | enable doctor  
 NODE  | datanode slave  | dn2_2  | t  | enable doctor  
 NODE  | datanode master | dn4_1  | t  | enable doctor  
 NODE  | coordinator  | cn4  | t  | enable doctor  
 NODE  | datanode slave  | dn3_2  | t  | enable doctor  
 NODE  | datanode slave  | dn4_2  | t  | enable doctor  
HOST | -- | adb01 | t | enable doctor 
HOST | -- | adb02 | t | enable doctor 
(22 rows) 
Enter fullscreen mode Exit fullscreen mode

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry 🕒

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more