Commit graph

92 commits

Author SHA1 Message Date
Bomin Zhang
876979b5f5
feat[ts-6107]: shared storage (#31552)
* add API to use s3 as shared storage

* support using local file system as shared storage

* upload file to shared storage

* support read, compact and drop

* finish basic mnode & vnode msg processing

* follower sync migration state

* implement mnode transaction, and improve log

* send migration progress msg to dnode to avoid deadlock

* implement following migration

* remove mcount

* avoid redo migration on startup

* avoid follower deadlock when leader is down

* trigger migrate by timer,  avoid compact after migration

* comment out the usage of 'tcs' functions in stream

* change config item prefix from s3 to ss

* change db option prefix from s3 to ss

* rename s3 data struct, function, file to ss

* rename s3 macro to ss

* update s3 sql to ss

* rename remaining s3 items to ss

* check ss configruation, improve s3 retry

* grant object storage -> shared storage,  check ssEnabled

* fix memory leaks

* update build options

* omit sensitive information when dump config

* fix backward compatibility issue

* fix issues found in ci-checks

* fix some failed test cases

* avoid follower timeout and improve log

* fix: follower timeout because migration status not updated

* refuse migration if there's an in progress one

* fix ss test case

* remove garbage files and other minor improvement

* fix failed test cases

* update unit test

* fix failed test case

* fix failed test case

* update document

* update document and fix failed test cases

* fix minor issues in code, test and document

* check new commit after migration task is scheduled

* fix several issus

1. migrate information cannot be dropped sometimes because progress response was put into read queue.
2. memory leak in rare cases
3. data corruption in rare cases
4. failed test case

* add shared storage upgrade tool

* fix compile error
2025-07-14 16:33:53 +08:00
Kaili Xu
dc2b021778
feat: support mount data path (#31677) 2025-07-12 15:39:29 +08:00
Haojun Liao
dfe32225de chore: merge main. 2025-03-17 14:51:11 +08:00
Haojun Liao
ab92886820
fix(stream): reduce the consensus checkpoint id trans. (#30105)
* fix(stream): reduce the consensus checkpoint id trans.

* refactor(stream): add some logs.

* refactor(stream): set the max checkpoint exec time 30min.

* refactor(stream): add checkpoint-consensus trans conflict check.

* refactor(stream): remove unused local variables.

* fix(stream): fix syntax error.

* fix(stream): 1. fix free memory error 2. continue if put result into dst hashmap failed.

* fix issue

* fix issue

* fix(mnd): follower mnode not processes the timer event.

* fix(stream): print correct error msg.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): truncate long subtable name

* fix(stream): add buffer len.

* refactor(stream): update some logs.

* fix issue

* refactor(stream): update some logs.

* refactor(stream): update some logs.

* fix(stream): check return value.

* fix(stream): fix syntax error.

* fix(stream): check return value.

* fix(stream): update the timer check in mnode.

* fix(stream): add restart stage tracking.

* fix(stream): track the start task stage for meta.

* fix(stream): fix error in log.

* refactor(stream): adjust log info.

* fix mem issue

* fix(stream): check the number of required tasks for consensus checkpointId.

* fix(stream): lock the whole start procedure.

* fix(stream): add lock during start all tasks.

* fix(stream): update logs.

* fix(stream): update logs.

* fix(stream): update logs.

* fix(stream): fix dead-lock.

* fix(stream): fix syntax error.

* fix(stream): not drop the scan-history task.

* fix(stream): fix syntax error.

* fix(stream): wait for executor stop before restarting.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): add some logs.

* fix(stream): disable some logs.

* fix(stream): reset the start info if no task left.

---------

Co-authored-by: 54liuyao <54liuyao@163.com>
Co-authored-by: Jinqing Kuang <kuangjinqingcn@gmail.com>
2025-03-17 10:20:17 +08:00
Kaili Xu
13f9bddf3d
feat: support customized taos/taosd (#29736)
* feat: support TDAcoreOS

* chore: cmake options for TD_ACORE

* chore: disable lemon for TD_ACORE

* chore: add lzma2 and msvcregex

* chore: cmake for lzma2

* chore: adapt for TD_ACORE

* chore: adapt strcasecmp for TD_ACORE

* chore: adapt for geos/threadName

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE

* chore: build adapt for TD_ACORE termio

* chore: refact transComm.h for TD_ACORE

* chore: refact transportInt.h for TD_ACORE

* chore: refact trans.c for TD_ACORE

* chore: refact trpc.h for TD_ACORE

* chore: refact transCli.c/transComm.c/transSvr.c for TD_ACORE

* chore: refact uv.h for TD_ACORE

* chore: refact geosWrapper.h for TD_ACORE

* chore: refact token/builtins/udf for TD_ACORE

* chore: refact rocks for TD_ACORE

* chore: refact tsdbCache.c for TD_ACORE, use LRU cache for last/last_row, not use rocksdb

* chore: refact FAIL to _ERR to solve conflicts for TD_ACORE

* chore: restore lemon.c/lempar.c

* chore: support build lemon for TD_ACORE

* chore: refact trpc and siginfo_t for TD_ACORE

* chore: refact timezone for TD_ACORE

* chore: refact lz4 for TD_ACORE

* chore: refact TD_ACORE to make compile pass

* chore: code optimization for TD_ASTRA

* feat: support run taos with taosd integrated

* feat: support invoke taos shell

* feat: support invoke taos shell

* feat: support invoke taos shell

* chore: code optimization

* chore: fix undefined reference problem os TD_ASTRA

* chore: resolve compile problem for TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix undefined reference problem os TD_ASTRA

* chore: fix getpid

* chore: fix typo

* chore: set stack size and ajust min pack size for TD_ASTRA

* chore: fix pthread create parameters

* chore: chmod adapt for TD_ASTRA

* chore: fix trans compile problem

* chore: adapt chmod for TD_ASTRA

* chore: byte alignment for TD_ASTRA

* chore: more code for adaption of TD_ASTRA

* chore: more code for adaption of TD_ASTRA

* chore: more code for adaption of TD_ASTRA

* chore: byte alignment for TD_ASTRA

* chore: conditional compile option

* chore: adapt for TD_ASTRA

* chore: adjust taosPId and msvcregex for TD_ASTRA

* chore: log dir separator for wal build name

* chore: fix type of pointer parameter

* chore: fix compile problem of tsdbGetS3Size

* enh: get last ver from wal log for TD_ASTRA

* enh: refact wal meta ver

* enh: refact wal meta ver

* fix: typo of taosUcs4Compare

* enh: process return value of CI

* chore: more code for TD_ASTRA adaption

* chore: return value of taosCloseFile in walMeta.c

* chore: fix compile problem

* chore: fix compile problem of TD_ASTRA

* fix: update macro for tq and stream task

* chore: code optimization for TD_ASTRA

* chore: restore create log and init cfg interface

* chore: restore strncasecmp and strcasecmp

* fix: adjust the field position of SDataBlockInfo

* fix: pragma pack min size

* fix: pragma pack min size

* chore: more code for TD_ASTRA adaption

* fix: type of parameters

* chore: adapt strncasecmp and strcasecmp for TD_ASTRA

* chore: restore interface of init log

* enh: pack push optimization

* fix: taos init cfg

* add astra support

* fix: fetch the value of suid

* chore: switch of  build with udf

* add temp code

* chore: more code for TD_ASTRA adaption

* chore: add macro ERRNO to replace errno

* chore: bytes align for TD_ASTRA

* fix: remove obsolete codes

* enh: support USE_UDF macro

* fix compile error

* fix: resolve redefinition problem

* fix: compile problem of log.cpp

* fix: compile problem of osTimezone

* fix: resolve compile problem of udf

* fix: pragma definition on windows

* fix: ucs4 and stpncpy for TD_ASTRA

* fix: memory align problem for TD_ASTRA

* enh: solve memory leak for TD_ASTRA_RPC

* fix: compile problem of taosSetInt64Aligned

* fix: restore mndSubscribe.c

* fix: scalar for udf

* chore: code adaption for TD_ASTRA

* chore: code optimization for TD_ASTRA

* fix: typo of add definition

* fix: typo of macro in tudf.h

* chore: remove void to make CI pass

* enh: move macro from cmake.platform to cmake.options

* enh: byte align for hash node and error code

* chore: restore the size for lru cache

* enh: restore some code about pack push

* chore: restore the pack push in tmsg.h

* fix: add macro of pack pop for windows

---------

Co-authored-by: yihaoDeng <luomoxyz@126.com>
2025-03-14 13:32:13 +08:00
kailixu
9fd2d86ae3 enh: memory safe function 2024-12-17 07:11:16 +00:00
Hongze Cheng
921704e043 more code 2024-12-13 15:28:15 +08:00
yihaoDeng
32b5ec1da7 opt code 2024-12-09 14:35:12 +08:00
yihaoDeng
c5c56606c4 use safe sys func 2024-12-05 16:35:45 +08:00
xiao-77
ca7f490e6d fix invaild snapshotVer while repair wal meta file 2024-10-15 16:53:15 +08:00
lyh250-666
3367c787b0 enh:modify error code passing 2024-09-20 08:56:46 +08:00
Hongze Cheng
f18c1d8710 enh: error code handle 2024-09-10 14:35:43 +08:00
Hongze Cheng
720ab67431 enh: clear useless asserts 2024-08-22 17:28:05 +08:00
Minglei Jin
21c266d123 fix(vnode/cfg): use default value if loading 0 2024-08-19 18:52:14 +08:00
Hongze Cheng
9792683b7d handle some of return -1 2024-08-14 17:50:20 +08:00
Hongze Cheng
cc10d70e5e enh: refactor return code 2024-07-29 13:54:50 +08:00
Hongze Cheng
c4d31e7737 enh: refactor error code 2024-07-22 19:40:07 +08:00
Hongze Cheng
c7a0d4c727 enh: refact morecode 2024-07-19 16:12:38 +08:00
Minglei Jin
568799a6a3 fix(wal/level): enable alter replica from fake walLevel 1 2024-06-12 15:16:58 +08:00
Hongze Cheng
fc5c84422e
Merge pull request #25256 from taosdata/feat/TD-24834
Feat/td 24834
2024-04-19 13:34:37 +08:00
Minglei Jin
eb51a7c5b5 vnode: encode the missing tsdbPageSize 2024-04-18 14:48:05 +08:00
kailixu
123090e18a fix: solve conflicts 2024-04-15 16:12:15 +08:00
dmchen
239acea831 remove useless vnode cfg 2024-04-09 02:38:45 +00:00
Minglei Jin
d5e9169769 cos/multi-write: dnode part including mnode/vnode/tsdb 2024-04-08 10:31:49 +08:00
dmchen
c43e937538 write config lock 2024-04-07 02:24:41 +00:00
kailixu
c4aba0ac37 feat: encryption key optimize and test case adjust 2024-04-01 16:14:55 +08:00
kailixu
717c4b3d9c chore: restore codes 2024-04-01 14:01:09 +08:00
kailixu
6eaa99bb2d feat: encryption algorithm 2024-04-01 13:58:13 +08:00
kailixu
8dce61b68f chore: merge TD-29280-3.0 2024-03-29 11:39:46 +08:00
dmchen
b9deb71fc5 basic function 2024-03-29 02:48:49 +00:00
kailixu
d64594932b feat: support database encryption 2024-03-27 20:03:38 +08:00
kailixu
c77153cb81 enh: use placeholder '-' for interval of 1st retention level 2023-10-30 14:02:31 +08:00
Shungang Li
743a5b0640 feat: add db config item keep_time_offset 2023-09-25 15:46:08 +08:00
dm chen
5b03ab1705
Merge branch '3.0' into feat/TD-22970 2023-08-03 17:43:51 +08:00
dmchen
3711fdd865 feat/TD-22970 2023-07-18 16:09:38 +08:00
Hongze Cheng
5ad9bd938f change default stt trigger as 2 2023-06-26 15:47:36 +08:00
Benguang Zhao
16fbcbb67a fix: filter by tbFName in metaFilterTableByHash 2023-06-12 14:19:50 +08:00
Benguang Zhao
5d63f438b5 enh: confirm alter hash range 2023-05-04 19:43:11 +08:00
cadem
2fd9640a39 change learner config format 2023-04-25 15:15:28 +08:00
cadem
8b16f4b118 config compitible 2023-04-19 18:02:04 +08:00
cadem
c22bd63ed4 vnode config compitible 2023-04-19 15:11:16 +08:00
cadem
3b78d4382b add learner 2023-04-18 19:03:45 +08:00
Minglei Jin
4e1f5b2979 fix(meta): cleanup coverity scan issues 2023-01-05 14:04:21 +08:00
Shengliang Guan
70b513c09c fix: vnode set the wrong replica info after snapshot transfered 2023-01-03 19:47:04 +08:00
Shengliang Guan
c2323db00d fix: allow the ip resolved by fqdn different between dnodes 2022-12-30 17:04:14 +08:00
Shengliang Guan
f24d8433e1 Merge branch 'main' into fix/td-21029 2022-12-17 20:13:53 +08:00
kailixu
96bfe146d5 fix: default value of tsdbPageSize 2022-12-16 18:28:10 +08:00
kailixu
728cbbac5e fix(tsdb): default value of tsdbPageSize 2022-12-16 16:55:12 +08:00
Hongze Cheng
63cc4e27b1 more code 2022-12-09 15:50:22 +08:00
Shengliang Guan
8055e79a82 feat: database option 'tsdb_pagesize' 2022-09-13 18:30:15 +08:00