Skip to content

Commit e0608d7

Browse files
authored
fix: alter minReservedMemorySize error code. (#31510)
1 parent 45feec5 commit e0608d7

File tree

12 files changed

+21
-17
lines changed

12 files changed

+21
-17
lines changed

docs/en/14-reference/09-error-code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ This document details the server error codes that may be encountered when using
295295
| 0x8000073A | Query memory exhausted | Query memory in dnode is exhausted | Limit concurrent queries or add more physical memory |
296296
| 0x8000073B | Timeout for long time no fetch | Query without fetch for a long time | Correct application to fetch data asap |
297297
| 0x8000073C | Memory pool not initialized | Memory pool not initialized in dnode | Confirm if the switch queryUseMemoryPool is enabled; if queryUseMemoryPool is already enabled, check if the server meets the basic conditions for enabling the memory pool: 1. The total available system memory is not less than 5GB; 2. The available system memory after deducting the reserved portion is not less than 4GB. |
298+
| 0x8000073D | Alter minReservedMemorySize failed since no enough system available memory | Failed to update minReservedMemorySize | Check current system memory: 1. Total available system memory should not be less than 5G; 2. Available system memory after deducting reserved portion should not be less than 4G |
298299

299300
## grant
300301

docs/zh/14-reference/09-error-code.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ description: TDengine 服务端的错误码列表和详细说明
307307
| 0x8000073A | Query memory exhausted | dnode 查询内存到达使用上限 | 设置合理的内存上限或调整并发查询量或增大系统内存 |
308308
| 0x8000073B | Timeout for long time no fetch | 查询被长时间中断未恢复 | 调整应用实现尽快 fetch 数据 |
309309
| 0x8000073C | Memory pool not initialized | 内存池没有初始化 | 确认开关 queryUseMemoryPool 是否打开;如果 queryUseMemoryPool 已经打开,检查服务器是否达到了开启内存池的基本条件:1. 系统的可用内存总量不低于 5G;2. 扣除预留部分后系统的可用内存不低于 4G |
310+
| 0x8000073D | Alter minReservedMemorySize failed since no enough system available memory | 更新 minReservedMemorySize 失败 | 确认当前的系统内存:1. 系统的可用内存总量不低于 5G;2. 扣除预留部分后系统的可用内存不低于 4G |
310311

311312
## grant
312313

include/util/taoserror.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ int32_t taosGetErrSize();
668668
#define TSDB_CODE_QRY_QUERY_MEM_EXHAUSTED TAOS_DEF_ERROR_CODE(0, 0x073A)
669669
#define TSDB_CODE_QRY_NO_FETCH_TIMEOUT TAOS_DEF_ERROR_CODE(0, 0x073B)
670670
#define TSDB_CODE_QRY_MEMORY_POOL_NOT_INITIALIZED TAOS_DEF_ERROR_CODE(0, 0x073C)
671+
#define TSDB_CODE_QRY_MEMORY_POOL_MEMORY_NOT_ENOUGH TAOS_DEF_ERROR_CODE(0, 0x073D)
671672

672673
// grant
673674
#define TSDB_CODE_GRANT_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x0800)

source/util/src/terror.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_QRY_QUERY_MEM_EXHAUSTED, "Query memory exhauste
532532
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_NO_FETCH_TIMEOUT, "Timeout for long time no fetch")
533533
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_TASK_SUCC_TO_PARTSUSS, "Change task status from success to partial success")
534534
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_MEMORY_POOL_NOT_INITIALIZED, "Memory pool not initialized")
535+
TAOS_DEFINE_ERROR(TSDB_CODE_QRY_MEMORY_POOL_MEMORY_NOT_ENOUGH, "Alter minReservedMemorySize failed since no enough system available memory")
535536

536537
// grant
537538
TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_EXPIRED, "License expired")

source/util/src/tmempool.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,15 +1782,15 @@ static int32_t mpUpdateReservedSize(SMemPool* pPool, int32_t newReservedSizeMB)
17821782
int64_t sysAvailSize = 0;
17831783
code = taosGetSysAvailMemory(&sysAvailSize);
17841784
if (code || sysAvailSize < MP_MIN_MEM_POOL_SIZE) {
1785-
uInfo("memory pool disabled since no enough system available memory, size: %" PRId64, sysAvailSize);
1786-
return TSDB_CODE_INVALID_PARA;
1785+
uInfo("failed to update reserved size since no enough system available memory, size: %" PRId64, sysAvailSize);
1786+
MP_ERR_RET(TSDB_CODE_QRY_MEMORY_POOL_MEMORY_NOT_ENOUGH);
17871787
}
17881788

17891789
int64_t freeSizeAfterRes = sysAvailSize - newReservedSizeMB * 1048576UL;
17901790
if (freeSizeAfterRes < MP_MIN_FREE_SIZE_AFTER_RESERVE) {
1791-
uInfo("memory pool disabled since no enough system available memory after reservied, size: %" PRId64,
1791+
uInfo("failed to update reserved size since no enough system available memory after reservied, size: %" PRId64,
17921792
freeSizeAfterRes);
1793-
return TSDB_CODE_INVALID_PARA;
1793+
MP_ERR_RET(TSDB_CODE_QRY_MEMORY_POOL_MEMORY_NOT_ENOUGH);
17941794
}
17951795

17961796
MP_LOCK(MP_WRITE, &pPool->cfgLock);
@@ -1806,11 +1806,11 @@ int32_t taosMemoryPoolCfgUpdateReservedSize(int32_t newReservedSizeMB) {
18061806
}
18071807
int32_t code = TSDB_CODE_SUCCESS;
18081808
if (NULL == gMemPoolHandle) {
1809-
uError("memory pool not initialized");
1809+
uError("failed to update reserved size since memory pool not initialized");
18101810
MP_ERR_RET(TSDB_CODE_QRY_MEMORY_POOL_NOT_INITIALIZED);
18111811
}
18121812
if (newReservedSizeMB < 0) {
1813-
uError("newReservedSizeMB:%d is invalid", newReservedSizeMB);
1813+
uError("failed to update reserved size since newReservedSizeMB:%d is invalid", newReservedSizeMB);
18141814
MP_ERR_RET(TSDB_CODE_INVALID_PARA);
18151815
}
18161816

test/ci/container_build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ docker run \
8282
-v ${REP_REAL_PATH}/community/contrib/pcre2/:${REP_DIR}/community/contrib/pcre2 \
8383
-v ${REP_REAL_PATH}/community/contrib/zlib/:${REP_DIR}/community/contrib/zlib \
8484
-v ${REP_REAL_PATH}/community/contrib/zstd/:${REP_DIR}/community/contrib/zstd \
85-
--rm --ulimit core=-1 taos_test:v1.0 sh -c "cd $REP_DIR;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=tdinternal -DBUILD_TOOLS=true -DBUILD_TEST=true -DWEBSOCKET=true -DBUILD_TAOSX=false -DJEMALLOC_ENABLED=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DTAOSADAPTER_GIT_TAG:STRING=${branch_taosadapter} ;make -j|| exit 1"
85+
--rm --ulimit core=-1 tdengine-ci:0.1 sh -c "cd $REP_DIR;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=tdinternal -DBUILD_TOOLS=true -DBUILD_TEST=true -DWEBSOCKET=true -DBUILD_TAOSX=false -DJEMALLOC_ENABLED=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DTAOSADAPTER_GIT_TAG:STRING=${branch_taosadapter} ;make -j|| exit 1"
8686
# -v ${REP_REAL_PATH}/community/contrib/jemalloc/:${REP_DIR}/community/contrib/jemalloc \
8787

8888
if [[ -d ${WORKDIR}/debugNoSan ]] ;then
@@ -134,7 +134,7 @@ docker run \
134134
-v ${REP_REAL_PATH}/community/contrib/pcre2/:${REP_DIR}/community/contrib/pcre2 \
135135
-v ${REP_REAL_PATH}/community/contrib/zlib/:${REP_DIR}/community/contrib/zlib \
136136
-v ${REP_REAL_PATH}/community/contrib/zstd/:${REP_DIR}/community/contrib/zstd \
137-
--rm --ulimit core=-1 taos_test:v1.0 sh -c "cd $REP_DIR;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true -DBUILD_TEST=false -DWEBSOCKET=true -DBUILD_SANITIZER=1 -DTOOLS_SANITIZE=true -DCMAKE_BUILD_TYPE=Debug -DTOOLS_BUILD_TYPE=Debug -DBUILD_TAOSX=false -DJEMALLOC_ENABLED=0 -DTAOSADAPTER_GIT_TAG:STRING=${branch_taosadapter};make -j|| exit 1 "
137+
--rm --ulimit core=-1 tdengine-ci:0.1 sh -c "cd $REP_DIR;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true -DBUILD_TEST=false -DWEBSOCKET=true -DBUILD_SANITIZER=1 -DTOOLS_SANITIZE=true -DCMAKE_BUILD_TYPE=Debug -DTOOLS_BUILD_TYPE=Debug -DBUILD_TAOSX=false -DJEMALLOC_ENABLED=0 -DTAOSADAPTER_GIT_TAG:STRING=${branch_taosadapter};make -j|| exit 1 "
138138

139139
mv ${REP_REAL_PATH}/debug ${WORKDIR}/debugSan
140140

test/ci/container_build_newmachine.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ docker run \
6161
-v /root/go/pkg/mod:/root/go/pkg/mod \
6262
-v /root/.cache/go-build:/root/.cache/go-build \
6363
-v /root/.cos-local.1:/root/.cos-local.2 \
64-
--rm --ulimit core=-1 taos_test:v1.0 sh -c "pip uninstall taospy -y;pip3 install taospy==2.8.1;cd $REP_DIR;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true -DBUILD_TEST=true -DWEBSOCKET=true -DBUILD_SANITIZER=1 -DTOOLS_SANITIZE=true $CMAKE_BUILD_TYPE -DTOOLS_BUILD_TYPE=Debug -DBUILD_TAOSX=false -DJEMALLOC_ENABLED=0;make -j 10|| exit 1 "
64+
--rm --ulimit core=-1 tdengine-ci:0.1 sh -c "pip uninstall taospy -y;pip3 install taospy==2.8.1;cd $REP_DIR;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true -DBUILD_TEST=true -DWEBSOCKET=true -DBUILD_SANITIZER=1 -DTOOLS_SANITIZE=true $CMAKE_BUILD_TYPE -DTOOLS_BUILD_TYPE=Debug -DBUILD_TAOSX=false -DJEMALLOC_ENABLED=0;make -j 10|| exit 1 "
6565
# -v ${REP_REAL_PATH}/community/contrib/jemalloc/:${REP_DIR}/community/contrib/jemalloc \
6666

6767
if [[ -d ${WORKDIR}/debugNoSan ]] ;then

test/ci/run_check_assert_container.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ ulimit -c unlimited
4242
cat << EOF
4343
docker run \
4444
-v $REP_MOUNT_PARAM \
45-
--rm --ulimit core=-1 taos_test:v1.0 python3 $check_assert_scripts
45+
--rm --ulimit core=-1 tdengine-ci:0.1 python3 $check_assert_scripts
4646
EOF
4747
docker run \
4848
-v "$REP_MOUNT_PARAM" \
49-
--rm --ulimit core=-1 taos_test:v1.0 python3 $check_assert_scripts
49+
--rm --ulimit core=-1 tdengine-ci:0.1 python3 $check_assert_scripts
5050

5151
ret=$?
5252
exit $ret

test/ci/run_check_void_container.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ ulimit -c unlimited
4444
cat << EOF
4545
docker run \
4646
-v $REP_MOUNT_PARAM \
47-
--rm --ulimit core=-1 taos_test:v1.0 "$check_assert_scripts" -c $func_list_file -f $source_file_path
47+
--rm --ulimit core=-1 tdengine-ci:0.1 "$check_assert_scripts" -c $func_list_file -f $source_file_path
4848
EOF
4949

5050
docker run \
5151
-v "$REP_MOUNT_PARAM" \
52-
--rm --ulimit core=-1 taos_test:v1.0 $check_assert_scripts -c $func_list_file -f $source_file_path
52+
--rm --ulimit core=-1 tdengine-ci:0.1 $check_assert_scripts -c $func_list_file -f $source_file_path
5353

5454
ret=$?
5555
exit $ret

test/ci/run_container.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ docker run \
139139
-v ${SOURCEDIR}:/usr/local/src/ \
140140
-v "$TMP_DIR/thread_volume/$thread_no/sim:${SIM_DIR}" \
141141
-v ${TMP_DIR}/thread_volume/$thread_no/coredump:$coredump_dir \
142-
--rm --ulimit core=-1 taos_test:v1.0 $CONTAINER_TESTDIR/test/ci/run_case.sh -d "$exec_dir" -c "$cmd" $extra_param
142+
--rm --ulimit core=-1 tdengine-ci:0.1 $CONTAINER_TESTDIR/test/ci/run_case.sh -d "$exec_dir" -c "$cmd" $extra_param
143143
ret=$?
144144
exit $ret

test/ci/run_scan_container.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ docker run \
8484
-v $REP_MOUNT_DEBUG \
8585
-v $scan_changefile_temp_path:$docker_can_changefile_temp_path \
8686
-v $scan_log_temp_path:$docker_scan_log_temp_path \
87-
--rm --ulimit core=-1 taos_test:v1.0 python3 $scan_scripts -b "${branch_name_id}" -f "${scan_file_name}" -w ${web_server}
87+
--rm --ulimit core=-1 tdengine-ci:0.1 python3 $scan_scripts -b "${branch_name_id}" -f "${scan_file_name}" -w ${web_server}
8888
EOF
8989
docker run \
9090
-v /root/.cos-local.1:/root/.cos-local.2 \
9191
-v $REP_MOUNT_PARAM \
9292
-v $REP_MOUNT_DEBUG \
9393
-v $scan_changefile_temp_path:$docker_can_changefile_temp_path \
9494
-v $scan_log_temp_path:$docker_scan_log_temp_path \
95-
--rm --ulimit core=-1 taos_test:v1.0 python3 $scan_scripts -b "${branch_name_id}" -f "${scan_file_name}" -w ${web_server}
95+
--rm --ulimit core=-1 tdengine-ci:0.1 python3 $scan_scripts -b "${branch_name_id}" -f "${scan_file_name}" -w ${web_server}
9696

9797

9898
ret=$?

test/new_test_framework/taostest/util/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TDCom:
6161
# docker image name variable
6262
docker_image_name_variable = "DOCKER_IMAGE_NAME"
6363
# default docker image name
64-
docker_image_name_default = "taos_test:v1.0"
64+
docker_image_name_default = "tdengine-ci:0.1"
6565
# container test root
6666
container_test_root = "/home/test_root"
6767
# entry point file name

0 commit comments

Comments
 (0)