shm
This commit is contained in:
parent
4cb813a920
commit
08c9fc40f4
|
@ -1,3 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* This program is free software: you can use, redistribute, and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3
|
||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "dndInt.h"
|
||||
|
||||
|
|
|
@ -28,7 +28,10 @@ static struct {
|
|||
|
||||
static void dndSigintHandle(int signum, void *info, void *ctx) {
|
||||
dInfo("signal:%d is received", signum);
|
||||
dndHandleEvent(global.pDnode, DND_EVENT_STOP);
|
||||
SDnode *pDnode = atomic_val_compare_exchange_ptr(&global.pDnode, 0, global.pDnode);
|
||||
if (pDnode != NULL) {
|
||||
dndHandleEvent(pDnode, DND_EVENT_STOP);
|
||||
}
|
||||
}
|
||||
|
||||
static void dndSetSignalHandle() {
|
||||
|
|
|
@ -58,7 +58,7 @@ static void mmBuildOptionForDeploy(SMnodeMgmt *pMgmt, SMnodeOpt *pOption) {
|
|||
SReplica *pReplica = &pOption->replicas[0];
|
||||
pReplica->id = 1;
|
||||
pReplica->port = pDnode->serverPort;
|
||||
memcpy(pReplica->fqdn, pDnode->localFqdn, TSDB_FQDN_LEN);
|
||||
tstrncpy(pReplica->fqdn, pDnode->localFqdn, TSDB_FQDN_LEN);
|
||||
|
||||
pMgmt->selfIndex = pOption->selfIndex;
|
||||
pMgmt->replica = pOption->replica;
|
||||
|
|
Loading…
Reference in New Issue