Benguang Zhao
e3f50c0d48
fix: align vers.firstVer with vers.snapshotVer+1 in WAL meta info
2022-10-16 13:10:57 +08:00
Benguang Zhao
616eb5f903
Merge branch '3.0' into FIX/TD-19239-3.0
2022-10-16 00:29:01 +08:00
Benguang Zhao
7fb827debd
fix: refactor walScanLogGetLastVer, walCheckAndRepairMeta, and walCheckAndRepairIdx.
...
* search for the last entry in the contiguous range of valid WAL from the last pos fsynced as firstTrial
* find the last entry before the last pos fsynced backwards as second trial
* reserve sufficient space for computing CRC32 checksum, esp. of WAL record body
* rebuild meta info to resolve potential misalignment between lists of meta and actual log files
* retract commitIndex and appliedIndex to lastLogIndex if needed
* put an upper size limit on possibly corrupted WAL range to be recovered
2022-10-15 23:56:31 +08:00
Benguang Zhao
948fa60ef0
fix: check the length of remaining content for computing CRC32 chksum of WAL record body
2022-10-14 22:57:28 +08:00
Benguang Zhao
63b13db10f
fix: eliminate asserts on getting and committing log entries
2022-10-14 22:57:27 +08:00
Benguang Zhao
df18ddbbb5
enh: remove WAL log file corrupted completely
2022-10-14 22:57:27 +08:00
Benguang Zhao
9055f63742
fix: ftruncate WAL log after the last valid WAL record properly in walScanLogGetLastVer
2022-10-14 22:43:41 +08:00
Benguang Zhao
76865258cf
enh: protect WAL meta by flushing to a tmpfile at first and then renaming
2022-10-14 22:32:15 +08:00
Benguang Zhao
36bf800e15
fix: improve fault tolerance on disk space full with error handling enhanced
2022-10-14 22:02:27 +08:00
Liu Jicong
6f8d4d6955
fix(tmq): push msg
2022-10-14 13:31:05 +08:00
Liu Jicong
69352e6e89
fix tbanme length check
2022-10-12 10:50:54 +08:00
Liu Jicong
41474e40bf
enh(wal): auto fix
2022-10-12 02:08:58 +08:00
Liu Jicong
26fae13c61
refactor(stream): state/session map id to tbname
2022-10-11 15:27:56 +08:00
Liu Jicong
fbfae317b3
refactor
2022-10-11 02:09:15 +08:00
Liu Jicong
b1594a6857
fix coverity scan
2022-10-10 11:44:17 +08:00
Liu Jicong
78b4d10249
optimize fix condition
2022-09-22 00:54:23 +08:00
Liu Jicong
a6733dbbd1
feat(wal): auto fix corrupt file
2022-09-21 23:51:24 +08:00
Liu Jicong
756a2d3d5d
merge 3.0
2022-09-19 19:29:20 +08:00
Liu Jicong
1604d72967
add log for wal
2022-09-19 17:40:38 +08:00
Liu Jicong
86c0fb56e0
enhance stream backend for sma
2022-09-19 17:27:25 +08:00
Liu Jicong
d7b804e02e
fix stream load task
2022-08-24 10:42:34 +08:00
Liu Jicong
2d628491b2
feat(stream): support tdb state backend
2022-08-23 19:30:04 +08:00
Liu Jicong
0c942e622a
enh(wal): remove file failure handling
2022-07-28 13:37:57 +08:00
Liu Jicong
5d20804e76
fix(wal): use after free
2022-07-20 17:10:41 +08:00
Liu Jicong
b74560537c
fix(stream): check task exist
2022-07-20 16:25:20 +08:00
Liu Jicong
bf37f3fa68
feat(wal): remove wal log size limitation
2022-07-20 16:15:53 +08:00
Liu Jicong
a3133b9f6d
feat(wal): log applied ver
2022-07-20 10:55:28 +08:00
Liu Jicong
c6052fadba
feat(wal): add append interface
2022-07-11 16:22:51 +08:00
Liu Jicong
9fd5ec9020
fix(wal): rollback
2022-07-11 13:38:50 +08:00
Liu Jicong
52d09b4173
refactor(wal)
2022-07-01 14:39:21 +08:00
Liu Jicong
7a65589525
feat(wal): add api to check log existance
2022-07-01 10:15:05 +08:00
Liu Jicong
04f11e2646
feat(wal): provide is empty api
2022-06-22 19:40:37 +08:00
Liu Jicong
7ab3a1e42c
feat(wal): support restore from snapshot
2022-06-09 23:08:06 +08:00
Liu Jicong
714dd4f497
enh(tmq): only read committed log
2022-05-11 14:42:20 +08:00
afwerar
fc24521621
fix(os): windows compile 3.0.
2022-04-22 09:54:27 +08:00
afwerar
c11946fd75
[TD-13756]<fix>: Fix macro name error.
2022-04-11 18:55:43 +08:00
Liu Jicong
e0f192046c
multiple level stream schedule
2022-03-28 11:47:39 +08:00
Liu Jicong
71097ea56a
put schema into stream
2022-03-26 16:48:14 +08:00
afwerar
222db126bc
[TD-13758]<fix>: redefine memory api.
2022-03-26 00:29:53 +08:00
afwerar
30c10ef8b3
[TD-13063]<fix>: prepare for win compilation.
2022-03-17 14:22:36 +08:00
afwerar
5afb3e2c00
[TD-13761]<fix>: redefine dir api.
2022-03-09 15:47:29 +08:00
afwerar
71e4c41941
[TD-13756]<fix>: file system remove func.
2022-03-04 16:45:20 +08:00
afwerar
35b3edaea5
[TD-13756]<fix>: file system stat access func.
2022-03-04 00:04:57 +08:00
afwerar
5a37fdf28f
[TD-13062]<fix>: cross platform file system.
2022-02-25 01:47:20 +08:00
yihaoDeng
92bef71ec7
rename MAX/MIN/POW2/SWAP name
2022-01-24 12:53:17 +08:00
Liu Jicong
cc8a02aeb4
fix mem leak
2022-01-18 16:17:58 +08:00
Liu Jicong
3b69bde0ce
add mq defination
2022-01-14 10:48:05 +08:00
Liu Jicong
05372238d0
refactor walRepairMeta
2022-01-11 19:55:08 +08:00
Liu Jicong
a6303b07d3
force repair
2022-01-11 17:55:53 +08:00
Liu Jicong
c22de779ac
add tmemmem
2022-01-11 16:55:40 +08:00
Liu Jicong
47f1558e7c
add wal handle meta corrupt
2022-01-11 15:40:10 +08:00
Liu Jicong
1e17d776f9
fix crash
2022-01-10 16:13:05 +08:00
Liu Jicong
0ba5427a9b
handle subscribe
2022-01-06 10:28:34 +08:00
Liu Jicong
d037b24e05
refactor wal
2021-12-17 13:40:27 +08:00
Liu Jicong
dfc8c4e0b7
format code
2021-12-16 15:04:13 +08:00
Liu Jicong
3d141cf109
refactor wal and tq
2021-12-15 17:17:50 +08:00
Liu Jicong
5874463cb1
refactor wal
2021-12-14 18:14:45 +08:00
Liu Jicong
dc24592929
add wal read handle
2021-12-13 18:33:30 +08:00
Liu Jicong
b2083ea62f
fix memory leak
2021-12-13 13:58:54 +08:00
Liu Jicong
9e4b890727
add test for wal snapshot
2021-12-11 17:18:18 +08:00
Liu Jicong
bd408504bb
make wal meta serialized and flushed into disk
2021-12-10 11:31:36 +08:00
Liu Jicong
cf93f4c239
add unit test for wal
2021-12-09 18:32:38 +08:00