diff --git a/src/dnode/src/dnodeMgmt.c b/src/dnode/src/dnodeMgmt.c index c968246a68e0f8db8c55f8964a9332b17a30fdcc..8f87a45fb724b667236e7ebb5a47460975dac362 100644 --- a/src/dnode/src/dnodeMgmt.c +++ b/src/dnode/src/dnodeMgmt.c @@ -464,7 +464,14 @@ void dnodeUpdateMnodeEpSetForPeer(SRpcEpSet *pEpSet) { dInfo("mnode EP list for peer is changed, numOfEps:%d inUse:%d", pEpSet->numOfEps, pEpSet->inUse); for (int i = 0; i < pEpSet->numOfEps; ++i) { pEpSet->port[i] -= TSDB_PORT_DNODEDNODE; - dInfo("mnode index:%d %s:%u", i, pEpSet->fqdn[i], pEpSet->port[i]) + dInfo("mnode index:%d %s:%u", i, pEpSet->fqdn[i], pEpSet->port[i]); + + if (!mnodeIsRunning()) { + if (strcmp(pEpSet->fqdn[i], tsLocalFqdn) == 0 && pEpSet->port[i] == tsServerPort) { + dInfo("mnode index:%d %s:%u should work as master", i, pEpSet->fqdn[i], pEpSet->port[i]); + sdbUpdateSync(); + } + } } tsDMnodeEpSet = *pEpSet; diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 115630d1a543dae2e5a55dbd0d6b0a815c322e27..25814a748e4bb1a1951c93979e26daabeffe6e2e 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -64,7 +64,7 @@ extern const int32_t TYPE_BYTES[11]; // TODO: replace and remove code below #define CHAR_BYTES sizeof(char) #define SHORT_BYTES sizeof(int16_t) -#define INT_BYTES sizeof(int) +#define INT_BYTES sizeof(int32_t) #define LONG_BYTES sizeof(int64_t) #define FLOAT_BYTES sizeof(float) #define DOUBLE_BYTES sizeof(double) @@ -73,7 +73,7 @@ extern const int32_t TYPE_BYTES[11]; #define TSDB_DATA_BOOL_NULL 0x02 #define TSDB_DATA_TINYINT_NULL 0x80 #define TSDB_DATA_SMALLINT_NULL 0x8000 -#define TSDB_DATA_INT_NULL 0x80000000 +#define TSDB_DATA_INT_NULL 0x80000000L #define TSDB_DATA_BIGINT_NULL 0x8000000000000000L #define TSDB_DATA_FLOAT_NULL 0x7FF00000 // it is an NAN @@ -304,7 +304,7 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size, void* buf #define TSDB_MIN_VNODES 64 #define TSDB_MAX_VNODES 2048 #define TSDB_MIN_VNODES_PER_DB 2 -#define TSDB_MAX_VNODES_PER_DB 16 +#define TSDB_MAX_VNODES_PER_DB 64 #define TSDB_DNODE_ROLE_ANY 0 #define TSDB_DNODE_ROLE_MGMT 1 diff --git a/src/util/inc/tscompression.h b/src/util/inc/tscompression.h index 37d1e7b5909cf68f4dc7a25803f94442dc2cf7b0..cca6d6e25054e7736ea28590fa4cb5ab788d6b07 100644 --- a/src/util/inc/tscompression.h +++ b/src/util/inc/tscompression.h @@ -26,7 +26,7 @@ extern "C" { #define COMP_OVERFLOW_BYTES 2 #define BITS_PER_BYTE 8 // Masks -#define INT64MASK(_x) ((1ul << _x) - 1) +#define INT64MASK(_x) ((((uint64_t)1) << _x) - 1) #define INT32MASK(_x) (((uint32_t)1 << _x) - 1) #define INT8MASK(_x) (((uint8_t)1 << _x) - 1) // Compression algorithm diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 000d36c17865630a0fa0557a50724e352a8ce1b0..977ef452ab4836aadba330634d9183fc9414b080 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -303,8 +303,8 @@ cd ../../../debug; make ./test.sh -f unique/mnode/mgmt22.sim ./test.sh -f unique/mnode/mgmt23.sim ./test.sh -f unique/mnode/mgmt24.sim -#./test.sh -f unique/mnode/mgmt25.sim -#./test.sh -f unique/mnode/mgmt26.sim +./test.sh -f unique/mnode/mgmt25.sim +./test.sh -f unique/mnode/mgmt26.sim ./test.sh -f unique/mnode/mgmt33.sim ./test.sh -f unique/mnode/mgmt34.sim ./test.sh -f unique/mnode/mgmtr2.sim diff --git a/tests/script/unique/mnode/mgmt23.sim b/tests/script/unique/mnode/mgmt23.sim index 7e60ab908b81dd0ad88e550b4b487123e8204b2d..485187286059289f67ab0c82241b049c71f68230 100644 --- a/tests/script/unique/mnode/mgmt23.sim +++ b/tests/script/unique/mnode/mgmt23.sim @@ -65,7 +65,7 @@ endi print ============== step4 sql drop dnode $hostname2 -sleep 8000 +sleep 16000 sql show mnodes $dnode1Role = $data2_1