From f97d290b31174e8f36b2cc7a845a8618176b2e96 Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 12 Jul 2021 00:07:31 +0000 Subject: [PATCH] adjust the max bytes per row --- src/inc/taosdef.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 9ab2542eb9..30d79f7116 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -197,9 +197,10 @@ do { \ /** * Don't change to 65536. As in some scenarios uint16_t (0~65535) is used to store the row len. - * Finally, we use 65531(65535 - 4), as the SDataRow and SKVRow including 4 bits header. + * So, we use 65531(65535 - 4), as the SDataRow and SKVRow including 4 bits header. + * If all cols are VarType except primary key, we need 4 bits to store the offset. 65531-8-4095*4=49143 */ -#define TSDB_MAX_BYTES_PER_ROW 65531 +#define TSDB_MAX_BYTES_PER_ROW 49143 #define TSDB_MAX_TAGS_LEN 16384 #define TSDB_MAX_TAGS 128 #define TSDB_MAX_TAG_CONDITIONS 1024