chore: for compatibility
This commit is contained in:
parent
efd6b578ff
commit
4339a0a320
|
@ -139,7 +139,9 @@ static SSdbRaw *mndDnodeActionEncode(SDnodeObj *pDnode) {
|
|||
SDB_SET_INT16(pRaw, dataPos, pDnode->port, _OVER)
|
||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
||||
SDB_SET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
||||
SDB_SET_INT16(pRaw, dataPos, TSDB_ACTIVE_KEY_LEN, _OVER)
|
||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER)
|
||||
SDB_SET_INT16(pRaw, dataPos, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
||||
SDB_SET_BINARY(pRaw, dataPos, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
||||
SDB_SET_DATALEN(pRaw, dataPos, _OVER);
|
||||
|
||||
|
@ -182,9 +184,11 @@ static SSdbRow *mndDnodeActionDecode(SSdbRaw *pRaw) {
|
|||
SDB_GET_BINARY(pRaw, dataPos, pDnode->fqdn, TSDB_FQDN_LEN, _OVER)
|
||||
SDB_GET_RESERVE(pRaw, dataPos, TSDB_DNODE_RESERVE_SIZE, _OVER)
|
||||
if (sver > 1) {
|
||||
// update the sver to process upgrade compatibility if increase the active_key len
|
||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->active, TSDB_ACTIVE_KEY_LEN, _OVER)
|
||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->connActive, TSDB_CONN_ACTIVE_KEY_LEN, _OVER)
|
||||
int16_t keyLen = 0;
|
||||
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->active, keyLen, _OVER)
|
||||
SDB_GET_INT16(pRaw, dataPos, &keyLen, _OVER)
|
||||
SDB_GET_BINARY(pRaw, dataPos, pDnode->connActive, keyLen, _OVER)
|
||||
}
|
||||
|
||||
terrno = 0;
|
||||
|
|
Loading…
Reference in New Issue