mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
* add API to use s3 as shared storage * support using local file system as shared storage * upload file to shared storage * support read, compact and drop * finish basic mnode & vnode msg processing * follower sync migration state * implement mnode transaction, and improve log * send migration progress msg to dnode to avoid deadlock * implement following migration * remove mcount * avoid redo migration on startup * avoid follower deadlock when leader is down * trigger migrate by timer, avoid compact after migration * comment out the usage of 'tcs' functions in stream * change config item prefix from s3 to ss * change db option prefix from s3 to ss * rename s3 data struct, function, file to ss * rename s3 macro to ss * update s3 sql to ss * rename remaining s3 items to ss * check ss configruation, improve s3 retry * grant object storage -> shared storage, check ssEnabled * fix memory leaks * update build options * omit sensitive information when dump config * fix backward compatibility issue * fix issues found in ci-checks * fix some failed test cases * avoid follower timeout and improve log * fix: follower timeout because migration status not updated * refuse migration if there's an in progress one * fix ss test case * remove garbage files and other minor improvement * fix failed test cases * update unit test * fix failed test case * fix failed test case * update document * update document and fix failed test cases * fix minor issues in code, test and document * check new commit after migration task is scheduled * fix several issus 1. migrate information cannot be dropped sometimes because progress response was put into read queue. 2. memory leak in rare cases 3. data corruption in rare cases 4. failed test case * add shared storage upgrade tool * fix compile error
58 lines
2.1 KiB
C
58 lines
2.1 KiB
C
/*
|
|
* 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/>.
|
|
*/
|
|
|
|
#ifndef _TD_MND_SSMIGRATE_H_
|
|
#define _TD_MND_SSMIGRATE_H_
|
|
|
|
#include "mndInt.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int32_t mndInitSsMigrate(SMnode *pMnode);
|
|
void mndCleanupSsMigrate(SMnode *pMnode);
|
|
|
|
void tFreeSsMigrateObj(SSsMigrateObj *pSsMigrate);
|
|
int32_t tSerializeSSsMigrateObj(void *buf, int32_t bufLen, const SSsMigrateObj *pObj);
|
|
int32_t tDeserializeSSsMigrateObj(void *buf, int32_t bufLen, SSsMigrateObj *pObj);
|
|
|
|
SSdbRaw* mndSsMigrateActionEncode(SSsMigrateObj *pSsMigrate);
|
|
SSdbRow* mndSsMigrateActionDecode(SSdbRaw *pRaw);
|
|
|
|
int32_t mndSsMigrateActionInsert(SSdb *pSdb, SSsMigrateObj *pSsMigrate);
|
|
int32_t mndSsMigrateActionDelete(SSdb *pSdb, SSsMigrateObj *pSsMigrate);
|
|
int32_t mndSsMigrateActionUpdate(SSdb *pSdb, SSsMigrateObj *pOldSsMigrate, SSsMigrateObj *pNewSsMigrate);
|
|
|
|
int32_t mndAddSsMigrateToTran(SMnode *pMnode, STrans *pTrans, SSsMigrateObj* pSsMigrate, SDbObj *pDb);
|
|
|
|
int32_t mndRetrieveSsMigrate(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rows);
|
|
|
|
int32_t mndProcessKillSsMigrateReq(SRpcMsg *pReq);
|
|
|
|
int32_t mndProcessQuerySsMigrateRsp(SRpcMsg *pReq);
|
|
|
|
SSsMigrateObj *mndAcquireSsMigrate(SMnode *pMnode, int64_t compactId);
|
|
void mndReleaseSsMigrate(SMnode *pMnode, SSsMigrateObj *pSsMigrate);
|
|
|
|
int32_t mndSsMigrateGetDbName(SMnode *pMnode, int32_t compactId, char *dbname, int32_t len);
|
|
void mndSsMigrateSendProgressReq(SMnode *pMnode, SSsMigrateObj *pSsMigrate);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /*_TD_MND_SSMIGRATE_H_*/
|
|
|