Commit Graph

89 Commits

Author SHA1 Message Date
Benguang Zhao 95493432ed enh: trim the last WAL idx file which is not fsynced 2023-01-16 14:12:26 +08:00
Benguang Zhao 0c4ade9373 fix: update sync node commitIndex only if matchTerm equals currentTerm upon heartbeat 2022-12-28 20:25:52 +08:00
Benguang Zhao c4fad84c7c enh: reset commitVer in WAL on restore 2022-12-28 20:25:52 +08:00
Shengliang Guan 6d94afe48f
Revert "refact: adjust some assert cases" 2022-12-07 21:51:17 +08:00
Shengliang Guan d5126d469a refact: replcase ASSERT with tAssert 2022-12-07 18:42:48 +08:00
Benguang Zhao 3f1a0cefbb fix: walSaveMeta ahead of deleting WAL files as gc in walEndSnapshot
delete WAL files in descending order during walRollback
2022-12-06 00:51:45 +08:00
Shengliang Guan d9c261cd13 refact: remove some error codes 2022-12-03 10:17:02 +08:00
Benguang Zhao 95f8e96eb5 fix: align firstVer with lastVer too if no WAL logs exist 2022-11-22 23:42:08 +08:00
Liu Jicong 7c8b2867ce enh(stream): add stream task info into information schema 2022-11-14 19:23:42 +08:00
Shengliang Guan 77a6cf503e
Merge pull request #17824 from taosdata/FIX/TS-1984-3.0
fix: set firstTrial as false if error encountered in loop of walScanLogGetLastVer
2022-11-02 15:49:48 +08:00
benguang.zhao 8a5130a88d fix: set firstTrial as false if error encountered in loop of walScanLogGetLastVer 2022-11-02 10:21:40 +08:00
Shengliang Guan 871757240a
Merge pull request #17777 from taosdata/FIX/TS-1984-3.0
fix: fsync wal files and meta if data size not synced yet beyond a threshold
2022-11-01 18:53:10 +08:00
benguang.zhao 4e46b78aa0 fix: update info of WAL entry found within loop in walScanLogGetLastVer 2022-11-01 17:56:24 +08:00
benguang.zhao 3c1c95c5e6 enh: turn error on WAL data size to recover exceeding a limit as warn 2022-11-01 17:26:31 +08:00
benguang.zhao 4237cafb21 enh: rename walRecoverSizeLimit to walFsyncDataSizeLimit 2022-11-01 17:19:33 +08:00
benguang.zhao ffa6906a9f Merge branch 'FIX/TS-1984-3.0' of github.com:taosdata/TDengine into FIX/TS-1984-3.0 2022-11-01 15:52:25 +08:00
benguang.zhao 6907e3dfe3 enh: scan forward step by step in walScanLogGetLastVer 2022-11-01 15:25:18 +08:00
Shengliang Guan a031010a9e
Merge pull request #17721 from taosdata/FIX/TD-19673-3.0
enh: check completeness of WAL log entries after repairing
2022-11-01 13:59:34 +08:00
Shengliang Guan 26778f29da enh: add config for persist wal at the beginning of vnodeCommit 2022-11-01 10:42:13 +08:00
benguang.zhao cccfa17027 fix: fsync wal files and their meta if data size unsynced exceeds a limit 2022-10-31 23:58:49 +08:00
Benguang Zhao fd3a1de904 fix: use the relative pos during searching in walScanLogGetLastVer 2022-10-28 11:47:44 +08:00
Benguang Zhao 31a0421878 enh: check completeness of WAL log entries after repairing 2022-10-27 15:55:22 +08:00
Liu Jicong 2a3448552e test(wal): rollback multiple file 2022-10-26 18:03:25 +08:00
Shengliang Guan 6c3cd3e19e test: adjust log 2022-10-21 10:39:29 +08:00
Benguang Zhao 3b0968d7f9 enh: enable the -Wformat=2 compiler option 2022-10-19 09:24:15 +08:00
Benguang Zhao 3190ef65a3 fix: deal with misaligned idx entries in walCheckAndRepairIdxFile 2022-10-18 11:21:48 +08:00
Benguang Zhao a4fd2def98 fix: resolve a typo in errormsg printing in walScanLogGetLastVer 2022-10-17 14:22:20 +08:00
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