remove the hard code for max number of vnodes
This commit is contained in:
parent
0ba919dbac
commit
769ef5be3c
|
@ -132,7 +132,7 @@ static int32_t dnodeOpenVnodes() {
|
|||
char vnodeDir[TSDB_FILENAME_LEN * 3];
|
||||
int32_t failed = 0;
|
||||
|
||||
int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * 10000);
|
||||
int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * TSDB_MAX_VNODES);
|
||||
int32_t numOfVnodes = dnodeGetVnodeList(vnodeList);
|
||||
|
||||
for (int32_t i = 0; i < numOfVnodes; ++i) {
|
||||
|
@ -147,7 +147,7 @@ static int32_t dnodeOpenVnodes() {
|
|||
}
|
||||
|
||||
static void dnodeCloseVnodes() {
|
||||
int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * 10000);
|
||||
int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * TSDB_MAX_VNODES);
|
||||
int32_t numOfVnodes = dnodeGetVnodeList(vnodeList);
|
||||
|
||||
for (int32_t i = 0; i < numOfVnodes; ++i) {
|
||||
|
|
Loading…
Reference in New Issue