* Determines if this process is the leader WAL process. * * The leader is the process that first enabled profiling over the given env var. * All descendant processes inherit the environment. * * @param envVarName - Environment variable name for storing coordinator ID * @param insta
(envVarName: string, instanceID: string)
| 157 | * @returns true if this is the leader WAL process, false otherwise |
| 158 | */ |
| 159 | static isCoordinatorProcess(envVarName: string, instanceID: string): boolean { |
| 160 | return process.env[envVarName] === instanceID; |
| 161 | } |
| 162 | |
| 163 | /** |
| 164 | * Create a sharded WAL manager. |