Merge from feature/table
This commit is contained in:
commit
9fd8ed5239
|
@ -1 +1 @@
|
||||||
Subproject commit 8c58c512b6acda8bcdfa48fdc7140227b5221766
|
Subproject commit 66df175edf467df6f80d07789f1a35a6d2551310
|
|
@ -334,7 +334,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size, void* buf
|
||||||
|
|
||||||
#define TSDB_MIN_DAYS_PER_FILE 1
|
#define TSDB_MIN_DAYS_PER_FILE 1
|
||||||
#define TSDB_MAX_DAYS_PER_FILE 3650
|
#define TSDB_MAX_DAYS_PER_FILE 3650
|
||||||
#define TSDB_DEFAULT_DAYS_PER_FILE 2
|
#define TSDB_DEFAULT_DAYS_PER_FILE 10
|
||||||
|
|
||||||
#define TSDB_MIN_KEEP 1 // data in db to be reserved.
|
#define TSDB_MIN_KEEP 1 // data in db to be reserved.
|
||||||
#define TSDB_MAX_KEEP 365000 // data in db to be reserved.
|
#define TSDB_MAX_KEEP 365000 // data in db to be reserved.
|
||||||
|
|
|
@ -126,7 +126,7 @@ uint32_t tsdbGetFileInfo(TSDB_REPO_T *repo, char *name, uint32_t *index, uint32_
|
||||||
// the TSDB repository info
|
// the TSDB repository info
|
||||||
typedef struct STsdbRepoInfo {
|
typedef struct STsdbRepoInfo {
|
||||||
STsdbCfg tsdbCfg;
|
STsdbCfg tsdbCfg;
|
||||||
int64_t version; // version of the repository
|
uint64_t version; // version of the repository
|
||||||
int64_t tsdbTotalDataSize; // the original inserted data size
|
int64_t tsdbTotalDataSize; // the original inserted data size
|
||||||
int64_t tsdbTotalDiskSize; // the total disk size taken by this TSDB repository
|
int64_t tsdbTotalDiskSize; // the total disk size taken by this TSDB repository
|
||||||
// TODO: Other informations to add
|
// TODO: Other informations to add
|
||||||
|
@ -136,7 +136,7 @@ STsdbRepoInfo *tsdbGetStatus(TSDB_REPO_T *pRepo);
|
||||||
// the meter information report structure
|
// the meter information report structure
|
||||||
typedef struct {
|
typedef struct {
|
||||||
STableCfg tableCfg;
|
STableCfg tableCfg;
|
||||||
int64_t version;
|
uint64_t version;
|
||||||
int64_t tableTotalDataSize; // In bytes
|
int64_t tableTotalDataSize; // In bytes
|
||||||
int64_t tableTotalDiskSize; // In bytes
|
int64_t tableTotalDiskSize; // In bytes
|
||||||
} STableInfo;
|
} STableInfo;
|
||||||
|
|
|
@ -71,7 +71,7 @@ typedef struct _SSdbTable {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ESyncRole role;
|
ESyncRole role;
|
||||||
ESdbStatus status;
|
ESdbStatus status;
|
||||||
int64_t version;
|
uint64_t version;
|
||||||
int64_t sync;
|
int64_t sync;
|
||||||
void * wal;
|
void * wal;
|
||||||
SSyncCfg cfg;
|
SSyncCfg cfg;
|
||||||
|
|
|
@ -1219,13 +1219,17 @@ static int32_t syncForwardToPeerImpl(SSyncNode *pNode, void *data, void *mhandle
|
||||||
int32_t fwdLen;
|
int32_t fwdLen;
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
if (nodeRole == TAOS_SYNC_ROLE_SLAVE && pWalHead->version > nodeVersion + 1) {
|
|
||||||
sError("vgId:%d, received ver:%" PRIu64 ", inconsistent with last ver:%" PRIu64 ", restart connection", pNode->vgId,
|
if (pWalHead->version > nodeVersion + 1) {
|
||||||
pWalHead->version, nodeVersion);
|
sError("vgId:%d, hver:%" PRIu64 ", inconsistent with ver:%" PRIu64, pNode->vgId, pWalHead->version, nodeVersion);
|
||||||
for (int32_t i = 0; i < pNode->replica; ++i) {
|
if (nodeRole == TAOS_SYNC_ROLE_SLAVE) {
|
||||||
pPeer = pNode->peerInfo[i];
|
sInfo("vgId:%d, restart connection", pNode->vgId);
|
||||||
syncRestartConnection(pPeer);
|
for (int32_t i = 0; i < pNode->replica; ++i) {
|
||||||
|
pPeer = pNode->peerInfo[i];
|
||||||
|
syncRestartConnection(pPeer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TSDB_CODE_SYN_INVALID_VERSION;
|
return TSDB_CODE_SYN_INVALID_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mchange</groupId>
|
<groupId>com.mchange</groupId>
|
||||||
<artifactId>c3p0</artifactId>
|
<artifactId>c3p0</artifactId>
|
||||||
<version>0.9.5.2</version>
|
<version>0.9.5.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- log4j -->
|
<!-- log4j -->
|
||||||
|
|
Loading…
Reference in New Issue