chore: restore codes
This commit is contained in:
parent
6eaa99bb2d
commit
717c4b3d9c
|
@ -299,11 +299,11 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(req.encryptAlgorithm == DND_CA_SM4){
|
//if(req.encryptAlgorithm == DND_CA_SM4){
|
||||||
// if(strlen(tsEncryptKey) == 0){
|
if(strlen(tsEncryptKey) == 0){
|
||||||
// terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
||||||
// dError("vgId:%d, failed to create vnode since encrypt key is empty", req.vgId);
|
dError("vgId:%d, failed to create vnode since encrypt key is empty", req.vgId);
|
||||||
// return -1;
|
return -1;
|
||||||
// }
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
vmGenerateVnodeCfg(&req, &vnodeCfg);
|
vmGenerateVnodeCfg(&req, &vnodeCfg);
|
||||||
|
|
|
@ -477,16 +477,16 @@ static int32_t mndInitWal(SMnode *pMnode) {
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(TD_ENTERPRISE)
|
#if defined(TD_ENTERPRISE)
|
||||||
// if(tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_MNODE_WAL) == DND_CS_MNODE_WAL){
|
if(tsiEncryptAlgorithm == DND_CA_SM4 && (tsiEncryptScope & DND_CS_MNODE_WAL) == DND_CS_MNODE_WAL){
|
||||||
// cfg.encryptAlgorithm = (tsiEncryptScope & DND_CS_MNODE_WAL)? tsiEncryptAlgorithm : 0;
|
cfg.encryptAlgorithm = (tsiEncryptScope & DND_CS_MNODE_WAL)? tsiEncryptAlgorithm : 0;
|
||||||
// if(tsEncryptKey[0] == '\0'){
|
if(tsEncryptKey[0] == '\0'){
|
||||||
// terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
||||||
// return -1;
|
return -1;
|
||||||
// }
|
}
|
||||||
// else{
|
else{
|
||||||
// strncpy(cfg.encryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
strncpy(cfg.encryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pMnode->pWal = walOpen(path, &cfg);
|
pMnode->pWal = walOpen(path, &cfg);
|
||||||
|
|
|
@ -246,15 +246,15 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
|
||||||
tjsonGetNumberValue(pJson, "tsdb.encryptAlgorithm", pCfg->tsdbCfg.encryptAlgorithm, code);
|
tjsonGetNumberValue(pJson, "tsdb.encryptAlgorithm", pCfg->tsdbCfg.encryptAlgorithm, code);
|
||||||
if (code < 0) return -1;
|
if (code < 0) return -1;
|
||||||
#if defined(TD_ENTERPRISE)
|
#if defined(TD_ENTERPRISE)
|
||||||
// if(pCfg->tsdbCfg.encryptAlgorithm == DND_CA_SM4){
|
if(pCfg->tsdbCfg.encryptAlgorithm == DND_CA_SM4){
|
||||||
// if(tsEncryptKey[0] == 0){
|
if(tsEncryptKey[0] == 0){
|
||||||
// terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
||||||
// return -1;
|
return -1;
|
||||||
// }
|
}
|
||||||
// else{
|
else{
|
||||||
// strncpy(pCfg->tsdbCfg.encryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
strncpy(pCfg->tsdbCfg.encryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
#endif
|
#endif
|
||||||
tjsonGetNumberValue(pJson, "wal.vgId", pCfg->walCfg.vgId, code);
|
tjsonGetNumberValue(pJson, "wal.vgId", pCfg->walCfg.vgId, code);
|
||||||
if (code < 0) return -1;
|
if (code < 0) return -1;
|
||||||
|
@ -273,28 +273,28 @@ int vnodeDecodeConfig(const SJson *pJson, void *pObj) {
|
||||||
tjsonGetNumberValue(pJson, "wal.encryptAlgorithm", pCfg->walCfg.encryptAlgorithm, code);
|
tjsonGetNumberValue(pJson, "wal.encryptAlgorithm", pCfg->walCfg.encryptAlgorithm, code);
|
||||||
if (code < 0) return -1;
|
if (code < 0) return -1;
|
||||||
#if defined(TD_ENTERPRISE)
|
#if defined(TD_ENTERPRISE)
|
||||||
// if(pCfg->walCfg.encryptAlgorithm == DND_CA_SM4){
|
if(pCfg->walCfg.encryptAlgorithm == DND_CA_SM4){
|
||||||
// if(tsEncryptKey[0] == 0){
|
if(tsEncryptKey[0] == 0){
|
||||||
// terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
||||||
// return -1;
|
return -1;
|
||||||
// }
|
}
|
||||||
// else{
|
else{
|
||||||
// strncpy(pCfg->walCfg.encryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
strncpy(pCfg->walCfg.encryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
#endif
|
#endif
|
||||||
tjsonGetNumberValue(pJson, "tdbEncryptAlgorithm", pCfg->tdbEncryptAlgorithm, code);
|
tjsonGetNumberValue(pJson, "tdbEncryptAlgorithm", pCfg->tdbEncryptAlgorithm, code);
|
||||||
if (code < 0) return -1;
|
if (code < 0) return -1;
|
||||||
#if defined(TD_ENTERPRISE)
|
#if defined(TD_ENTERPRISE)
|
||||||
// if(pCfg->tdbEncryptAlgorithm == DND_CA_SM4){
|
if(pCfg->tdbEncryptAlgorithm == DND_CA_SM4){
|
||||||
// if(tsEncryptKey[0] == 0){
|
if(tsEncryptKey[0] == 0){
|
||||||
// terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
terrno = TSDB_CODE_DNODE_INVALID_ENCRYPTKEY;
|
||||||
// return -1;
|
return -1;
|
||||||
// }
|
}
|
||||||
// else{
|
else{
|
||||||
// strncpy(pCfg->tdbEncryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
strncpy(pCfg->tdbEncryptKey, tsEncryptKey, ENCRYPT_KEY_LEN);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
#endif
|
#endif
|
||||||
tjsonGetNumberValue(pJson, "sstTrigger", pCfg->sttTrigger, code);
|
tjsonGetNumberValue(pJson, "sstTrigger", pCfg->sttTrigger, code);
|
||||||
if (code < 0) pCfg->sttTrigger = TSDB_DEFAULT_SST_TRIGGER;
|
if (code < 0) pCfg->sttTrigger = TSDB_DEFAULT_SST_TRIGGER;
|
||||||
|
|
|
@ -338,13 +338,13 @@ class TDTestCase:
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.prepare_data()
|
self.prepare_data()
|
||||||
# self.count_check()
|
self.count_check()
|
||||||
# self.ins_columns_check()
|
self.ins_columns_check()
|
||||||
# self.ins_col_check_4096()
|
# self.ins_col_check_4096()
|
||||||
# self.ins_stable_check()
|
self.ins_stable_check()
|
||||||
# self.ins_stable_check2()
|
self.ins_stable_check2()
|
||||||
# self.ins_dnodes_check()
|
self.ins_dnodes_check()
|
||||||
# self.ins_grants_check()
|
self.ins_grants_check()
|
||||||
self.ins_encryptions_check()
|
self.ins_encryptions_check()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue