Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
302463f6
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
302463f6
编写于
2月 23, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set default offset config
上级
48283e42
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
294 addition
and
292 deletion
+294
-292
include/util/tdef.h
include/util/tdef.h
+293
-291
source/client/src/tmq.c
source/client/src/tmq.c
+1
-1
未找到文件。
include/util/tdef.h
浏览文件 @
302463f6
...
...
@@ -13,6 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#ifndef _TD_UTIL_DEF_H
#define _TD_UTIL_DEF_H
...
...
@@ -94,21 +95,20 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_TIME_PRECISION_MICRO_STR "us"
#define TSDB_TIME_PRECISION_NANO_STR "ns"
#define TSDB_TICK_PER_SECOND(precision) \
((int64_t)((precision) == TSDB_TIME_PRECISION_MILLI ? 1e3L \
: ((precision) == TSDB_TIME_PRECISION_MICRO ? 1e6L : 1e9L)))
#define TSDB_TICK_PER_SECOND(precision) ((int64_t)((precision)==TSDB_TIME_PRECISION_MILLI ? 1e3L : ((precision)==TSDB_TIME_PRECISION_MICRO ? 1e6L : 1e9L)))
#define T_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#define T_APPEND_MEMBER(dst, ptr, type, member) \
do {
\
memcpy((void *)(dst), (void *)(&((ptr)->member)), T_MEMBER_SIZE(type, member));
\
dst = (void *)((char *)(dst) + T_MEMBER_SIZE(type, member));
\
} while
(0)
do {
\
memcpy((void *)(dst), (void *)(&((ptr)->member)), T_MEMBER_SIZE(type, member));
\
dst = (void *)((char *)(dst) + T_MEMBER_SIZE(type, member));
\
} while
(0)
#define T_READ_MEMBER(src, type, target) \
do {
\
do {
\
(target) = *(type *)(src); \
(src) = (void *)((char *)src + sizeof(type)); \
} while (0)
(src) = (void *)((char *)src + sizeof(type));\
} while(0)
// TODO: check if below is necessary
#define TSDB_RELATION_INVALID 0
...
...
@@ -162,7 +162,7 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_ACCT_ID_LEN 11
#define TSDB_MAX_COLUMNS 4096
#define TSDB_MIN_COLUMNS
2 //
PRIMARY COLUMN(timestamp) + other columns
#define TSDB_MIN_COLUMNS
2 //
PRIMARY COLUMN(timestamp) + other columns
#define TSDB_NODE_NAME_LEN 64
#define TSDB_TABLE_NAME_LEN 193 // it is a null-terminated string
...
...
@@ -181,18 +181,18 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_TYPE_STR_MAX_LEN 32
#define TSDB_TABLE_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_TABLE_NAME_LEN + TSDB_NAME_DELIMITER_LEN)
#define TSDB_TOPIC_FNAME_LEN TSDB_TABLE_FNAME_LEN
#define TSDB_CONSUMER_GROUP_LEN
193
#define TSDB_CONSUMER_GROUP_LEN
192
#define TSDB_SUBSCRIBE_KEY_LEN (TSDB_CONSUMER_GROUP_LEN + TSDB_TOPIC_FNAME_LEN + 2)
#define TSDB_PARTITION_KEY_LEN
(TSDB_SUBSCRIBE_KEY_LEN + 20
)
#define TSDB_PARTITION_KEY_LEN
(TSDB_CONSUMER_GROUP_LEN + TSDB_TOPIC_FNAME_LEN + 2
)
#define TSDB_COL_NAME_LEN 65
#define TSDB_MAX_SAVED_SQL_LEN TSDB_MAX_COLUMNS * 64
#define TSDB_MAX_SQL_LEN TSDB_PAYLOAD_SIZE
#define TSDB_MAX_SQL_SHOW_LEN 1024
#define TSDB_MAX_ALLOWED_SQL_LEN
(1 * 1024 * 1024u)
// sql length should be less than 1mb
#define TSDB_MAX_ALLOWED_SQL_LEN
(1*1024*1024u)
// sql length should be less than 1mb
#define TSDB_APP_NAME_LEN TSDB_UNI_LEN
#define TSDB_STB_COMMENT_LEN 1024
/**
/**
* In some scenarios uint16_t (0~65535) is used to store the row len.
* - Firstly, we use 65531(65535 - 4), as the SDataRow/SKVRow contains 4 bits header.
* - Secondly, if all cols are VarDataT type except primary key, we need 4 bits to store the offset, thus
...
...
@@ -239,7 +239,7 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_DB_TYPE_DEFAULT 0
#define TSDB_DB_TYPE_TOPIC 1
#define TSDB_DEFAULT_PKT_SIZE
65480 //
same as RPC_MAX_UDP_SIZE
#define TSDB_DEFAULT_PKT_SIZE
65480 //
same as RPC_MAX_UDP_SIZE
#define TSDB_PAYLOAD_SIZE TSDB_DEFAULT_PKT_SIZE
#define TSDB_DEFAULT_PAYLOAD_SIZE 5120 // default payload size, greater than PATH_MAX value
...
...
@@ -327,8 +327,8 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_MAX_UNION_CLAUSE 5
#define TSDB_MAX_FIELD_LEN 16384
#define TSDB_MAX_BINARY_LEN (TSDB_MAX_FIELD_LEN
- TSDB_KEYSIZE)
// keep 16384
#define TSDB_MAX_NCHAR_LEN (TSDB_MAX_FIELD_LEN
- TSDB_KEYSIZE)
// keep 16384
#define TSDB_MAX_BINARY_LEN (TSDB_MAX_FIELD_LEN
-TSDB_KEYSIZE)
// keep 16384
#define TSDB_MAX_NCHAR_LEN (TSDB_MAX_FIELD_LEN
-TSDB_KEYSIZE)
// keep 16384
#define PRIMARYKEY_TIMESTAMP_COL_ID 1
#define COL_REACH_END(colId, maxColId) ((colId) > (maxColId))
...
...
@@ -339,6 +339,8 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_META_COMPACT_RATIO 0 // disable tsdb meta compact by default
/*
* 1. ordinary sub query for select * from super_table
* 2. all sqlobj generated by createSubqueryObj with this flag
...
...
@@ -377,7 +379,7 @@ extern const int32_t TYPE_BYTES[15];
#define TSDB_DEFAULT_STABLES_HASH_SIZE 100
#define TSDB_DEFAULT_CTABLES_HASH_SIZE 20000
#define TSDB_MAX_WAL_SIZE
(1024 * 1024 *
3)
#define TSDB_MAX_WAL_SIZE
(1024*1024*
3)
#define TSDB_ARB_DUMMY_TIME 4765104000000 // 2121-01-01 00:00:00.000, :P
...
...
source/client/src/tmq.c
浏览文件 @
302463f6
...
...
@@ -126,7 +126,7 @@ typedef struct {
tmq_conf_t
*
tmq_conf_new
()
{
tmq_conf_t
*
conf
=
calloc
(
1
,
sizeof
(
tmq_conf_t
));
conf
->
auto_commit
=
false
;
conf
->
resetOffset
=
TMQ_CONF__RESET_OFFSET__
EARLIEA
ST
;
conf
->
resetOffset
=
TMQ_CONF__RESET_OFFSET__
LATE
ST
;
return
conf
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录