Skip to content

Commit

Permalink
merge main (#21022)
Browse files Browse the repository at this point in the history
* fix: check uv_is_closing before uv_close

* fix: fix compilation error

* fix:optimize log & change the length of tag if tag is null in schemaless

* fix: table level privilege

* enhance: add udf replace function test case

* refactor: do some internall refactor.

* fix: fix max/min(tag) random result

* fix(shell): update the double display.

* add test cases

* fix(udf1): use 1 as luck number to make new gcc happy

* fix(stream): disable the deploy msg when restart taosd.

* fix(shell): update the display of double value.

* docs:compile error (#20865)

* merge main

* add test cases

* fix:modify fileContent for data compare

* fix:rm useless fileContent function

* fix(test/udf): use 1 as lucky number instead of 88

* fix(tsdb/cache): skip schema updating for non ts row

* refactor(tq): do some internal refactor.

* refactor: do some internal refactor.

* fix:modify checkFileContent if one is empty

* merge main

* Update 03-package.md

* fix: script if share not exist (#20875)

* Update 14-stream.md

* enh: change the error msg of INVALID_VGROUP_ID to Vnode is closed or removed

* enh: change sync log repl mgr to sync log repl in logging msg

* enh: refactor func names doOnce, attempt, probe, and sendTo of syncLogRepl

* enh: refactor func name syncLogIsReplicationBarrier to syncLogReplBarrier

* fix: show user privileges invalid write

* merge main

* fix:open test cases for tmq & add log if rebalance error

* fix: fix constant comparision precision error

* fix(driver): return error code to java (#20869)

* fix: taosdump continue if fail (#20886)

* fix: taosdump continue if ts out of range for main (#20887)

* fix: error querying after setting permissions for varchar type tags

* fix: the precision of delete statement

* chore: revert the extra line

* chore: revert the extra line

* chore: more code

* chore: add test case to CI

* add test cases

* test: add flush database in tsim/parser/last_cache.sim and limit1.sim

* docs: add rest api diff (#20892)

* docs: use html table in rest api (#20893)

* docs: add rest api diff

* docs: use html table

* test: reopen tmqDelete-1ctb.py

* docs: use json instead of table in rest api (#20895)

* docs: add rest api diff

* docs: use html table

* docs: use json instead of table in rest api doc

* enh: refactor some vars in syncLogReplProcessReplyAsNormal

* fix:doBitmapMerge error if remaind bytes is not 0

* fix(tsdb/read): remove duplicat schema fetching

* docs: fix connector case (#20900)

* docs: add rest api diff

* docs: use html table

* docs: use json instead of table in rest api doc

* docs: fix connector upcase

* Update 29-changes.md

* Update 29-changes.md

* fix translatefunc not getting precision issue

* fix(tsdb/cache): fix block index ref releasing

* enh(taosAdapter): make the schemaless automatic database creation configurable (#20903)

* enh(taosAdapter): make the schemaless automatic database creation configurable (#20902)

* balance leader to enterprise

* fix: fix illegal usage of _isfilled/_irowts

* test: add cases for TS-3150

* fix: fix illegal usage of _isfilled/_irowts

* fix(tsdb/read): release bi cache entry before returning

* add test cases

* fix spread timestmap column reading sma issue

* chore: fix install.sh for explorer

* enh(docker): add debugging tools in TDengine image (#20908)

* Doc/xsren/install des on mac base main (#20910)

* install desc on mac

* echo > exception

---------

Co-authored-by: facetosea <25808407@qq.com>

* fix: alter table check

* fix crash

* chore: fix packaging install.sh for explorer OEM

* enh(docker): add debugging tools in TDengine image (#20909)

* chore: fix install.sh when not root

* fix: add client option tsEnableScience

* fix: build error fix

* fix: adjust format

* fix: remove obsolete code

* fix: optimizing 'alter table drop tag' error reporting

* Update cases.task

close tmqDelete-1ctb.py

* Update tmqDelete-1ctb.py

* Update cases.task

reopen tmqDelete-1ctb.py

* fix: optimizing 'alter table drop tag' error reporting

* enh: try to propose vnode commit at vnode closing

* fix: add three more stars for shell mask for main (#20916)

* fix(stream): all data should be extracted from wal.

* fix(stream): fix memory leak.

* fix:memset nullBitmap of SSDataBlock to 0 in udf

* fix(stream): remove unused tqreader, do some internal refactor, set the meta value for streamtask.

* enchance: increate testpackage.sh timeout seconds (#20920)

* ench: increate testpackage.sh timeout seconds

* Update debRpmAutoInstall.sh

extend timeout to 30

* fix(stream): don't the initial task status and do some internal refactor.

* test: modify test case

* release: upgrade default version

* opti:the logic of mndDoRebalance for clear

* fix(query): fix the invalid read.

* fix: udf plan error

* fix: an important fix

* fix more code

* fix(stream): disable the status check.

* refactor: increase the buffer size

* make it compile

* fix(stream): update the version when open stream tasks.

* opti:the logic of mndDoRebalance for clear

* fix(stream): set the correct initial checkpoint version to restore the operators state and add check for the initial destination tables.

* fix(stream): disable stream task when no tasks exist.

* other: merge main.

* refactor: do some internal refactor.

* fix(query): return correct suid to delete sink.

* fix(stream): update the table list api.

* fix: fix double free caused crash

* fix:stream memory leak

* enh: remove unused functions in sync

* fix:rebalance not only one in once timer

* fix(stream): set the correct start offset for stream task.

* fix(stream): set the correct initial offset value.

* fix(query): set the table schema correctly when the table is dropped.

* chore(deps): bump spring-core in /examples/JDBC/taosdemo (#20955)

Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.3.26 to 5.3.27.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](spring-projects/spring-framework@v5.3.26...v5.3.27)

---
updated-dependencies:
- dependency-name: org.springframework:spring-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(query): fix invalid free.

* fix: duplicate calling shellWriteHistory

* fix: atoi on int64 config item (#20956)

* fix local variable

* feat: support exit by kill heart-beat thread mode

* fix: illegal accesses (#20960) (#20962)

* fix(stream): update the reference count value to be int32, insead of int8

* opti:escape logic in schemaless

* enh: ignore single row null data type validation

* fix(os): fix a deadlock.

* fix(os): fix the link error in unit test cases.

* fix: trim database db from mnd

* test:add testcase of compatibility,py for TS-3209

* fix: tdengine swarm cluster(3 mnodes) startup error (#20966)

* fix: tdengine swarm cluster(3 mnodes) startup error

add check if dnode has been created when TDengine docker image starts

Resolves #19837

* refactor: change the check (#6f53e8ed76) location

* other: update wal logs level.

* test: add the cast that select field include two udf function

* fix: do not performace table count scan optimized where there are no agg functions

* test: fix udf1_dup error

* test: select fields error

* test: add udf2_dup test case

* test: add udf2_dup test case

* test: add udf2_dup test case

* fix: invalid identifier check

* enhance: modify inside isEligibleAgg func

* fix:add test cases for escape in schemaless

* fix(stream): add lock during check wal to create new stream task.

* fix:add test cases for escape in schemaless

* fix:[TS-3221] reset max stmt if execute error

* enh(stream): add more check to stop stream asap.

* other: do some internal refactor.

* enh(stream): set the max input queue size to be 3000.

* fix:add test cases for escape in schemaless

* test: modify tmq case

* fix:add test cases for escape in schemaless

* other: add some logs.

* enh(stream): stop stream asap.

* fix(stream): set the correct number of tasks.

* fix(stream): fix the race condition during create new stream tasks.

* log: update the log.

* enhance: enterprise package include jdbc driver (#21001)

* fix(stream): fix error in start stream tasks.

* refactor: do some internal refactor.

* fix(stream): fix memory leak.

* fix:[TS-3250] change strtegy in schemaless if modifyDBSchema error

* fix:[TS-3082] change offset to firstver if offset is smller than firstVer when wal is removed

* fix(stream): set the correct offset version.

* feat: support new table_prefix/table_suffix mode

* fix: add table_prefix/table_suffix cases

* fix: memory leak issue

* fix:ci error

* fix: taosdump escape dbname (#21014)

* fix: taosdump escape dbname

* fix: json file for escape char

* fix: update taostools ffc2e6f

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Haojun Liao <hjxilinx@users.noreply.github.com>
Co-authored-by: shenglian zhou <shenglian_zhou@163.com>
Co-authored-by: wangmm0220 <wangmm0220@gmail.com>
Co-authored-by: Xiaoyu Wang <xiaoyuwang@taosdata.com>
Co-authored-by: Xiaoyu Wang <59301069+xiao-yu-wang@users.noreply.github.com>
Co-authored-by: Haojun Liao <hjliao@taosdata.com>
Co-authored-by: Ganlin Zhao <ganlinzhao@hotmail.com>
Co-authored-by: dapan1121 <72057773+dapan1121@users.noreply.github.com>
Co-authored-by: Minglei Jin <mljin@taosdata.com>
Co-authored-by: Bo Ding <dingbo8128@163.com>
Co-authored-by: wade zhang <95411902+gccgdb1234@users.noreply.github.com>
Co-authored-by: Shuduo Sang <sangshuduo@gmail.com>
Co-authored-by: liuyao <38781207+54liuyao@users.noreply.github.com>
Co-authored-by: Benguang Zhao <bgzhao@taosdata.com>
Co-authored-by: huolibo <huolibo@qq.com>
Co-authored-by: kailixu <klxu@taosdata.com>
Co-authored-by: plum-lihui <huili@taosdata.com>
Co-authored-by: Hui Li <52318143+plum-lihui@users.noreply.github.com>
Co-authored-by: Xuefeng Tan <1172915550@qq.com>
Co-authored-by: cadem <cademfly@hotmail.com>
Co-authored-by: jiajingbin <jiajaybin@126.com>
Co-authored-by: Huo Linhe <linhehuo@gmail.com>
Co-authored-by: xinsheng Ren <285808407@qq.com>
Co-authored-by: facetosea <25808407@qq.com>
Co-authored-by: Alex Duan <417921451@qq.com>
Co-authored-by: xiaolei li <85657333+xleili@users.noreply.github.com>
Co-authored-by: xleili <xlli@taosdata.com>
Co-authored-by: Hongze Cheng <hzcheng@taosdata.com>
Co-authored-by: liuyao <54liuyao@163.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dapan1121 <wpan@taosdata.com>
Co-authored-by: chenhaoran <haoran920c@163.com>
Co-authored-by: Kaiyu Zhu <kingzhuky88@gmail.com>
  • Loading branch information
1 parent df132b5 commit 3776658
Show file tree
Hide file tree
Showing 674 changed files with 28,270 additions and 13,037 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Expand Up @@ -10,6 +10,8 @@ if (NOT DEFINED TD_SOURCE_DIR)
set( TD_SOURCE_DIR ${PROJECT_SOURCE_DIR} )
endif()

SET(TD_COMMUNITY_DIR ${PROJECT_SOURCE_DIR})

set(TD_SUPPORT_DIR "${TD_SOURCE_DIR}/cmake")
set(TD_CONTRIB_DIR "${TD_SOURCE_DIR}/contrib")

Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -365,6 +365,6 @@ Please follow the [contribution guidelines](CONTRIBUTING.md) to contribute to th
For more information about TDengine, you can follow us on social media and join our Discord server:

- [Discord](https://discord.com/invite/VZdSuUg4pS)
- [Twitter](https://twitter.com/TaosData)
- [Twitter](https://twitter.com/TDengineDB)
- [LinkedIn](https://www.linkedin.com/company/tdengine/)
- [YouTube](https://www.youtube.com/channel/UCmp-1U6GS_3V3hjir6Uq5DQ)
- [YouTube](https://www.youtube.com/@tdengine)
2 changes: 1 addition & 1 deletion cmake/cmake.define
Expand Up @@ -121,7 +121,7 @@ ELSE ()
MESSAGE(STATUS "Compile with Address Sanitizer!")
ELSE ()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -gdwarf-2 -g3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-literal-suffix -Werror=return-type -fPIC -gdwarf-2 -g3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-reserved-user-defined-literal -Wno-literal-suffix -Werror=return-type -fPIC -gdwarf-2 -g3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
ENDIF ()

# disable all assert
Expand Down
21 changes: 19 additions & 2 deletions cmake/cmake.version
Expand Up @@ -2,7 +2,7 @@
IF (DEFINED VERNUMBER)
SET(TD_VER_NUMBER ${VERNUMBER})
ELSE ()
SET(TD_VER_NUMBER "3.0.3.0")
SET(TD_VER_NUMBER "3.0.4.0")
ENDIF ()

IF (DEFINED VERCOMPATIBLE)
Expand All @@ -16,7 +16,7 @@ find_program(HAVE_GIT NAMES git)
IF (DEFINED GITINFO)
SET(TD_VER_GIT ${GITINFO})
ELSEIF (HAVE_GIT)
execute_process(COMMAND git log -1 --format=%H WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMITID)
execute_process(COMMAND git log -1 --format=%H WORKING_DIRECTORY ${TD_COMMUNITY_DIR} OUTPUT_VARIABLE GIT_COMMITID)
#message(STATUS "git log result:${GIT_COMMITID}")
IF (GIT_COMMITID)
string (REGEX REPLACE "[\n\t\r]" "" GIT_COMMITID ${GIT_COMMITID})
Expand All @@ -30,6 +30,23 @@ ELSE ()
SET(TD_VER_GIT "no git commit id")
ENDIF ()

IF (DEFINED GITINFOI)
SET(TD_VER_GIT_INTERNAL ${GITINFOI})
ELSEIF (HAVE_GIT)
execute_process(COMMAND git log -1 --format=%H WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE GIT_COMMITID)
message(STATUS "git log result:${GIT_COMMITID}")
IF (GIT_COMMITID)
string (REGEX REPLACE "[\n\t\r]" "" GIT_COMMITID ${GIT_COMMITID})
SET(TD_VER_GIT_INTERNAL ${GIT_COMMITID})
ELSE ()
message(STATUS "not a git repository")
SET(TD_VER_GIT "no git commit id")
ENDIF ()
ELSE ()
message(STATUS "no git cmd")
SET(TD_VER_GIT_INTERNAL "no git commit id")
ENDIF ()

IF (DEFINED VERDATE)
SET(TD_VER_DATE ${VERDATE})
ELSE ()
Expand Down
2 changes: 1 addition & 1 deletion cmake/taosadapter_CMakeLists.txt.in
Expand Up @@ -2,7 +2,7 @@
# taosadapter
ExternalProject_Add(taosadapter
GIT_REPOSITORY https://github.com/taosdata/taosadapter.git
GIT_TAG d8059ff
GIT_TAG e02ddb2
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taosadapter"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
Expand Down
2 changes: 1 addition & 1 deletion cmake/taostools_CMakeLists.txt.in
Expand Up @@ -2,7 +2,7 @@
# taos-tools
ExternalProject_Add(taos-tools
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
GIT_TAG ea02029
GIT_TAG ffc2e6f
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
BINARY_DIR ""
#BUILD_IN_SOURCE TRUE
Expand Down
9 changes: 9 additions & 0 deletions compile_flags.txt
@@ -0,0 +1,9 @@
-DLINUX
-DWEBSOCKET
-I/usr/include
-Iinclude
-Iinclude/os
-Iinclude/common
-Iinclude/util
-Iinclude/libs/transport
-Itools/shell/inc
4 changes: 2 additions & 2 deletions docs/doxgen/vnode_write.md
Expand Up @@ -204,7 +204,7 @@ group vnodeProcessReqs()
s -> s:
note right
save the requests in log store
and wait for comfirmation or
and wait for confirmation or
other cases
end note
Expand Down Expand Up @@ -236,7 +236,7 @@ s -> s: syncAppendReqToLogStore()
s -> v: walWrite()
alt has meta req
<- s: comfirmation
<- s: confirmation
else
s -> v: vnodeApplyReqs()
end
Expand Down
10 changes: 5 additions & 5 deletions docs/en/02-intro/index.md
Expand Up @@ -123,11 +123,11 @@ As a high-performance, scalable and SQL supported time-series database, TDengine

## Comparison with other databases

- [Writing Performance Comparison of TDengine and InfluxDB ](https://tdengine.com/2022/02/23/4975.html)
- [Query Performance Comparison of TDengine and InfluxDB](https://tdengine.com/2022/02/24/5120.html)
- [TDengine vs OpenTSDB](https://tdengine.com/2019/09/12/710.html)
- [TDengine vs Cassandra](https://tdengine.com/2019/09/12/708.html)
- [TDengine vs InfluxDB](https://tdengine.com/2019/09/12/706.html)
- [Writing Performance Comparison of TDengine and InfluxDB ](https://tdengine.com/performance-comparison-of-tdengine-and-influxdb/)
- [Query Performance Comparison of TDengine and InfluxDB](https://tdengine.com/query-performance-comparison-test-report-tdengine-vs-influxdb/)
- [TDengine vs OpenTSDB](https://tdengine.com/performance-tdengine-vs-opentsdb/)
- [TDengine vs Cassandra](https://tdengine.com/performance-tdengine-vs-cassandra/)
- [TDengine vs InfluxDB](https://tdengine.com/performance-tdengine-vs-influxdb/)

## More readings
- [Introduction to Time-Series Database](https://tdengine.com/tsdb/)
Expand Down
16 changes: 9 additions & 7 deletions docs/en/05-get-started/03-package.md
Expand Up @@ -188,7 +188,7 @@ You can use the TDengine CLI to monitor your TDengine deployment and execute ad

<TabItem label="Windows" value="windows">

After the installation is complete, run `C:\TDengine\taosd.exe` to start TDengine Server.
After the installation is complete, please run `sc start taosd` or run `C:\TDengine\taosd.exe` with administrator privilege to start TDengine Server.

## Command Line Interface (CLI)

Expand All @@ -202,16 +202,18 @@ After the installation is complete, double-click the /applications/TDengine to s

The following `launchctl` commands can help you manage TDengine service:

- Start TDengine Server: `launchctl start com.tdengine.taosd`
- Start TDengine Server: `sudo launchctl start com.tdengine.taosd`

- Stop TDengine Server: `launchctl stop com.tdengine.taosd`
- Stop TDengine Server: `sudo launchctl stop com.tdengine.taosd`

- Check TDengine Server status: `launchctl list | grep taosd`
- Check TDengine Server status: `sudo launchctl list | grep taosd`

:::info

- The `launchctl` command does not require _root_ privileges. You don't need to use the `sudo` command.
- The first content returned by the `launchctl list | grep taosd` command is the PID of the program, if '-' indicates that the TDengine service is not running.
- Please use `sudo` to run `launchctl` to manage _com.tdengine.taosd_ with administrator privileges.
- The administrator privilege is required for service management to enhance security.
- Troubleshooting:
- The first column returned by the command `launchctl list | grep taosd` is the PID of the program. If it's `-`, that means the TDengine service is not running.
- If the service is abnormal, please check the `launchd.log` file from the system log or the `taosdlog` from the `/var/log/taos directory` for more information.

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/en/07-develop/03-insert-data/60-high-volume.md
Expand Up @@ -28,7 +28,7 @@ From the perspective of application program, you need to consider:
- Writing to known existing tables is more efficient than writing to uncertain tables in automatic creating mode because the later needs to check whether the table exists or not before actually writing data into it.
- Writing in SQL is more efficient than writing in schemaless mode because schemaless writing creates table automatically and may alter table schema.

Application programs need to take care of the above factors and try to take advantage of them. The application progam should write to single table in each write batch. The batch size needs to be tuned to a proper value on a specific system. The number of concurrent connections needs to be tuned to a proper value too to achieve the best writing throughput.
Application programs need to take care of the above factors and try to take advantage of them. The application program should write to single table in each write batch. The batch size needs to be tuned to a proper value on a specific system. The number of concurrent connections needs to be tuned to a proper value too to achieve the best writing throughput.

### Data Source

Expand Down
30 changes: 18 additions & 12 deletions docs/en/07-develop/07-tmq.mdx
Expand Up @@ -7,6 +7,7 @@ title: Data Subscription
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import Java from "./_sub_java.mdx";
import JavaWS from "./_sub_java_ws.mdx"
import Python from "./_sub_python.mdx";
import Go from "./_sub_go.mdx";
import Rust from "./_sub_rust.mdx";
Expand All @@ -22,7 +23,7 @@ By subscribing to a topic, a consumer can obtain the latest data in that topic i

To implement these features, TDengine indexes its write-ahead log (WAL) file for fast random access and provides configurable methods for replacing and retaining this file. You can define a retention period and size for this file. For information, see the CREATE DATABASE statement. In this way, the WAL file is transformed into a persistent storage engine that remembers the order in which events occur. However, note that configuring an overly long retention period for your WAL files makes database compression inefficient. TDengine then uses the WAL file instead of the time-series database as its storage engine for queries in the form of topics. TDengine reads the data from the WAL file; uses a unified query engine instance to perform filtering, transformations, and other operations; and finally pushes the data to consumers.


Tips:The default data subscription is to consume data from the wal. If the wal is deleted, the consumed data will be incomplete. At this time, you can set the parameter experimental.snapshot.enable to true to obtain all data from the tsdb, but in this way, the consumption order of the data cannot be guaranteed. Therefore, it is recommended to set a reasonable retention policy for WAL based on your consumption situation to ensure that you can subscribe all data from WAL.

## Data Schema and API

Expand Down Expand Up @@ -284,18 +285,17 @@ You configure the following parameters when creating a consumer:

| Parameter | Type | Description | Remarks |
| :----------------------------: | :-----: | -------------------------------------------------------- | ------------------------------------------- |
| `td.connect.ip` | string | Used in establishing a connection; same as `taos_connect` | |
| `td.connect.user` | string | Used in establishing a connection; same as `taos_connect` | |
| `td.connect.pass` | string | Used in establishing a connection; same as `taos_connect` | |
| `td.connect.port` | string | Used in establishing a connection; same as `taos_connect` | |
| `td.connect.ip` | string | Used in establishing a connection; same as `taos_connect` | Only valid for establishing native connection |
| `td.connect.user` | string | Used in establishing a connection; same as `taos_connect` | Only valid for establishing native connection |
| `td.connect.pass` | string | Used in establishing a connection; same as `taos_connect` | Only valid for establishing native connection |
| `td.connect.port` | string | Used in establishing a connection; same as `taos_connect` | Only valid for establishing native connection |
| `group.id` | string | Consumer group ID; consumers with the same ID are in the same group | **Required**. Maximum length: 192. |
| `client.id` | string | Client ID | Maximum length: 192. |
| `auto.offset.reset` | enum | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) |
| `enable.auto.commit` | boolean | Commit automatically | Specify `true` or `false`. |
| `enable.auto.commit` | boolean | Commit automatically; true: user application doesn't need to explicitly commit; false: user application need to handle commit by itself | Default value is true |
| `auto.commit.interval.ms` | integer | Interval for automatic commits, in milliseconds |
| `enable.heartbeat.background` | boolean | Backend heartbeat; if enabled, the consumer does not go offline even if it has not polled for a long time | |
| `experimental.snapshot.enable` | boolean | Specify whether to consume messages from the WAL or from TSBS | |
| `msg.with.table.name` | boolean | Specify whether to deserialize table names from messages |
| `experimental.snapshot.enable` | boolean | Specify whether to consume data in TSDB; true: both data in WAL and in TSDB can be consumed; false: only data in WAL can be consumed | default value: false |
| `msg.with.table.name` | boolean | Specify whether to deserialize table names from messages | default value: false

The method of specifying these parameters depends on the language used:

Expand Down Expand Up @@ -368,7 +368,6 @@ conf := &tmq.ConfigMap{
"td.connect.port": "6030",
"client.id": "test_tmq_c",
"enable.auto.commit": "false",
"enable.heartbeat.background": "true",
"experimental.snapshot.enable": "true",
"msg.with.table.name": "true",
}
Expand Down Expand Up @@ -417,7 +416,7 @@ Python programs use the following parameters:
| `enable.auto.commit` | string | Commit automatically | pecify `true` or `false` |
| `auto.commit.interval.ms` | string | Interval for automatic commits, in milliseconds | |
| `auto.offset.reset` | string | Initial offset for the consumer group | Specify `earliest`, `latest`, or `none`(default) |
| `experimental.snapshot.enable` | string | Specify whether to consume messages from the WAL or from TSDB | Specify `true` or `false` |
| `experimental.snapshot.enable` | string | Specify whether it's allowed to consume messages from the WAL or from TSDB | Specify `true` or `false` |
| `enable.heartbeat.background` | string | Backend heartbeat; if enabled, the consumer does not go offline even if it has not polled for a long time | Specify `true` or `false` |

</TabItem>
Expand Down Expand Up @@ -807,7 +806,14 @@ The following section shows sample code in various languages.
</TabItem>
<TabItem label="Java" value="java">
<Java />
<Tabs defaultValue="native">
<TabItem value="native" label="native connection">
<Java />
</TabItem>
<TabItem value="ws" label="WebSocket connection">
<JavaWS />
</TabItem>
</Tabs>
</TabItem>
<TabItem label="Go" value="Go">
Expand Down
4 changes: 2 additions & 2 deletions docs/en/07-develop/09-udf.md
Expand Up @@ -65,11 +65,11 @@ int32_t aggfn_init() {
}
// aggregate start function. The intermediate value or the state(@interBuf) is initialized in this function. The function name shall be concatenation of udf name and _start suffix
// @param interbuf intermediate value to intialize
// @param interbuf intermediate value to initialize
// @return error number defined in taoserror.h
int32_t aggfn_start(SUdfInterBuf* interBuf) {
// initialize intermediate value in interBuf
return TSDB_CODE_SUCESS;
return TSDB_CODE_SUCCESS;
}
// aggregate reduce function. This function aggregate old state(@interbuf) and one data bock(inputBlock) and output a new state(@newInterBuf).
Expand Down
40 changes: 9 additions & 31 deletions docs/en/07-develop/_sub_java.mdx
@@ -1,31 +1,9 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs defaultValue="native">
<TabItem value="native" label="native connection">

```java
{{#include docs/examples/java/src/main/java/com/taos/example/SubscribeDemo.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/MetersDeserializer.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/Meters.java}}
```

</TabItem>
<TabItem value="ws" label="WebSocket connection">

```java
{{#include docs/examples/java/src/main/java/com/taos/example/WebsocketSubscribeDemo.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/MetersDeserializer.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/Meters.java}}
```

</TabItem>
</Tabs>
```java
{{#include docs/examples/java/src/main/java/com/taos/example/SubscribeDemo.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/MetersDeserializer.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/Meters.java}}
```
9 changes: 9 additions & 0 deletions docs/en/07-develop/_sub_java_ws.mdx
@@ -0,0 +1,9 @@
```java
{{#include docs/examples/java/src/main/java/com/taos/example/WebsocketSubscribeDemo.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/MetersDeserializer.java}}
```
```java
{{#include docs/examples/java/src/main/java/com/taos/example/Meters.java}}
```

0 comments on commit 3776658

Please sign in to comment.