Commit Graph

716 Commits

Author SHA1 Message Date
Xiaoyu Wang 24157e78d6 merge main 2023-01-28 17:52:58 +08:00
Benguang Zhao 1f01ba7cc0 fix: not keep wal log vnodeCommit'ed for single replica db 2023-01-18 16:34:08 +08:00
Benguang Zhao e55a76e25a Merge branch main into FIX/TD-21218-main 2023-01-18 10:15:16 +08:00
Benguang Zhao d611793537 enh: remove unused old routines in sync 2023-01-18 10:07:16 +08:00
Shengliang Guan e11d57d58c
Merge pull request #19533 from taosdata/FIX/TD-21662-main
enh: skip WAL forceSync for single replica vgroup
2023-01-17 14:25:04 +08:00
Shengliang Guan d476b6db13 enh: update epset on dnode info changed 2023-01-16 15:41:50 +08:00
Shengliang Guan bd531ccfb3
Merge pull request #19542 from taosdata/enh/TD-20047
refact: adjust return value of tmsgUpdateDnodeInfo
2023-01-13 10:54:10 +08:00
Shengliang Guan cd0404bc25 refact: adjust return value of tmsgUpdateDnodeInfo 2023-01-12 17:08:33 +08:00
Benguang Zhao 5a4cc36079 enh: skip WAL forceSync for single replica vgroup 2023-01-12 09:25:55 +08:00
Shengliang Guan cff741e4c4 fix: coverity issues 2023-01-11 16:56:14 +08:00
Shengliang Guan 2aeda3a941 enh: refact raft store file 2023-01-09 12:01:36 +08:00
Shengliang Guan 84bea778c9 Merge branch 'fix/TD-21746' into FIX/TD-21043-main 2023-01-05 16:15:50 +08:00
Shengliang Guan b8e1064b0f fix: compile error 2023-01-05 16:15:42 +08:00
Shengliang Guan ef3e60c387 Merge branch 'fix/TD-21746' into FIX/TD-21043-main 2023-01-05 15:58:30 +08:00
Shengliang Guan 7e5d97f0da fix: stop snapshot receiver on sync post close 2023-01-05 12:00:35 +08:00
Benguang Zhao 9d5e74a3ff Merge branch 'main' into FIX/TD-21043-main 2023-01-05 09:47:22 +08:00
Benguang Zhao 442902e5cb fix: send rpc response on closing sync or failing to enqueue 2023-01-04 19:18:46 +08:00
Shengliang Guan bf6dc99461 fix: adjust sync logs 2023-01-04 11:48:30 +08:00
Shengliang Guan 34260cd397 Merge branch 'main' into FIX/TD-21043-main 2023-01-04 09:29:07 +08:00
Shengliang Guan 70b513c09c fix: vnode set the wrong replica info after snapshot transfered 2023-01-03 19:47:04 +08:00
Benguang Zhao 4031dc1af4 Merge branch main into FIX/TD-21043-main 2023-01-02 16:41:46 +08:00
Shengliang Guan 01209614e6 fix: compatiable for pre version 2022-12-30 19:04:18 +08:00
Shengliang Guan c2323db00d fix: allow the ip resolved by fqdn different between dnodes 2022-12-30 17:04:14 +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
Shengliang Guan 09fbb8ebc4 Merge branch 'main' into FIX/TD-21535-main 2022-12-27 10:47:12 +08:00
Benguang Zhao a7bfeb5fbe fix: check existence of SMsgHead in SSyncRaftEntry data or SRpcMsg pCont 2022-12-26 23:10:46 +08:00
Shengliang Guan 794fb5d1b5 fix: handle error if sync buffer is full 2022-12-26 20:40:33 +08:00
Shengliang Guan 668a26c1b0 enh: handle error while transfer snapshot 2022-12-26 15:03:18 +08:00
Shengliang Guan 6e7e3139b1 fix: heap-use-after-free while alter vnode replicas 2022-12-21 17:33:34 +08:00
Shengliang Guan d674c8370b refact: update sync log 2022-12-20 21:30:46 +08:00
Shengliang Guan 12b6cf15a0 refact: set FpGetSnapshotInfo return type to void 2022-12-20 14:57:04 +08:00
Shengliang Guan ead5d8edf2 fix: reduce drop dnode speed makes data more secure 2022-12-17 18:34:29 +08:00
Shengliang Guan 60bab9ae55 refact: post sem in vnode while sync timeout 2022-12-14 16:09:28 +08:00
Shengliang Guan 9af36669ad refact: post sem in vnode while sync timeout 2022-12-14 11:56:08 +08:00
Shengliang Guan 2b256542a5 refact: add vnode timer 2022-12-14 09:14:40 +08:00
Minghao Li 291750b9c3 fix(sync): snapshot problem 2022-12-08 22:34:08 +08:00
Shengliang Guan 932d7a7ac6
Merge pull request #18808 from taosdata/fix/sync
fix(sync): checkout NULL pointer
2022-12-08 17:16:12 +08:00
Minghao Li abd5c696f0 fix(sync): checkout NULL pointer 2022-12-08 15:21:41 +08:00
Shengliang Guan 1bb1025f7d enh: add tassert 2022-12-07 22:24:47 +08:00
Shengliang Guan 6d94afe48f
Revert "refact: adjust some assert cases" 2022-12-07 21:51:17 +08:00
Shengliang Guan 4172acf95d git lo 2022-12-07 19:39:53 +08:00
Shengliang Guan d5126d469a refact: replcase ASSERT with tAssert 2022-12-07 18:42:48 +08:00
Minghao Li b107518b00 fix(sync): when FpApplyQueueItems return -1, break loop 2022-12-05 20:24:25 +08:00
Minghao Li a1ed4b334c fix(sync): close snapshot receiver in pre-close 2022-12-05 18:50:19 +08:00
Minghao Li 3939c96a92 refactor(sync): modify/use default config value 2022-12-05 12:35:57 +08:00
Minghao Li 575c5e89fc refactor(sync): add config item in sync 2022-12-04 09:49:27 +08:00
Benguang Zhao a7807d3ee4 fix: synchronize syncPropose for executing blocking msgs in vnodeProposeMsg 2022-12-03 20:53:56 +08:00
Shengliang Guan 13f36ec20a refact: remove TSDB_CODE_APP_NOT_READY and TSDB_CODE_NODE_NOT_DEPLOYED 2022-12-02 16:06:10 +08:00
Minghao Li 3f4ba9a792 fix(sync): delete duplicate code 2022-12-01 18:15:59 +08:00
Shengliang Guan 9f90467b68
Merge pull request #18614 from taosdata/feature/3.0_mhli
refactor(sync): put heartbeat-reply msg into sync-ctrl-queue
2022-12-01 17:25:54 +08:00
Shengliang Guan 704885e212 fix: compile error 2022-12-01 15:07:40 +08:00
Shengliang Guan fe759c85f3 Merge remote-tracking branch 'origin/3.0' into FIX/TD-19334-3.0 2022-12-01 15:04:55 +08:00
Shengliang Guan ce768920ef
Merge pull request #18604 from taosdata/feature/3.0_mhli
refactor(sync): add traceId log
2022-12-01 14:11:10 +08:00
Minghao Li bbd8c05181 Merge branch '3.0' of https://github.com/taosdata/TDengine into feature/3.0_mhli 2022-12-01 13:27:35 +08:00
Minghao Li f5bebc53f1 refactor(sync): add traceId log 2022-12-01 12:53:38 +08:00
Shengliang Guan b6f1ce2027
Merge pull request #18589 from taosdata/feature/3.0_mhli
refactor(sync): help to display leader**
2022-12-01 11:54:39 +08:00
Benguang Zhao 55bae49d56 Merge branch 3.0 to FIX/TD-19334-3.0 2022-11-30 23:47:30 +08:00
Minghao Li f0fdc58c52 refactor(sync): help to display leader** 2022-11-30 20:56:58 +08:00
Shengliang Guan d639198be5
Merge pull request #18561 from taosdata/fix/TD-20805
enh: show more info while drop dnode
2022-11-30 16:10:42 +08:00
Minghao Li 76cc7a89fb refacotr(sync), force stop snapshot sender/receiver when stop node 2022-11-30 13:44:22 +08:00
Shengliang Guan 5556fd0c45 enh: add sync offline state 2022-11-30 12:02:54 +08:00
Minghao Li a8832e8814 refactor(sync): modify info log 2022-11-30 11:20:03 +08:00
Benguang Zhao decb17fcb1 fix: use recursive mutex for relocking ring log buffer in syncNodeDoConfigChange 2022-11-29 23:19:32 +08:00
Minghao Li f87b9fa7fe refactor(sync): add interface syncSnapshotSending, syncSnapshotRecving 2022-11-29 19:41:03 +08:00
Benguang Zhao 470441c541 Merge branch 3.0 to FIX/TD-19334-3.0 2022-11-29 18:24:01 +08:00
Minghao Li 198e18c348 refactor(sync): add trace log for cache hit, cache miss 2022-11-29 14:58:47 +08:00
Minghao Li ebe1103964 refactor(sync): add trace log for elect count, become leader count, config change count 2022-11-29 14:39:42 +08:00
Minghao Li ab40b8190f fix(sync): fix asan error, TD-20801 2022-11-28 18:21:46 +08:00
Benguang Zhao dc2dcea3de Merge branch 3.0 to FIX/TD-19334-3.0 2022-11-28 14:27:10 +08:00
Shengliang Guan b6dbc462c8 fix: compile error 2022-11-26 11:56:13 +08:00
Shengliang Guan 9026a46c6f fix: compile error 2022-11-26 11:54:38 +08:00
Shengliang Guan 35eb754e4a Merge remote-tracking branch 'origin/3.0' into feature/3.0_mhli 2022-11-26 11:52:22 +08:00
Minghao Li 4a25963732 refactor(sync): optimized heartbeat timer 2022-11-26 10:46:57 +08:00
Benguang Zhao 736a1cc017 enh: adjust some info msgs for raft pipelining 2022-11-26 00:37:20 +08:00
Shengliang Guan a880f22bc6 refactor: adjust syncLog 2022-11-25 22:13:39 +08:00
Shengliang Guan 39ddf9faf8 refactor: adjust syncLogHeartbeat 2022-11-25 21:55:37 +08:00
Shengliang Guan 5035e5e953
Merge pull request #18463 from taosdata/feature/3.0_mhli
refactor(sync): add trace log
2022-11-25 21:07:11 +08:00
Minghao Li 93efefcbfc refactor(sync): add trace log 2022-11-25 18:19:25 +08:00
Benguang Zhao 68f8ebac9d Merge branch 3.0 to FIX/TD-19334-3.0 2022-11-25 13:10:06 +08:00
Minghao Li 9f38bfeb2c refactor(sync): modify info log to trace log 2022-11-24 16:50:58 +08:00
Minghao Li 7fba711d40 refactor(sync): add info log 2022-11-24 16:03:43 +08:00
Minghao Li 862a51e6ee refactor(sync): add timestamp trace log when elect and heartbeat 2022-11-24 12:03:05 +08:00
Benguang Zhao 2e640e8e68 feat: start snapshot in recovery mode of sync repl mgr with lastMatchTerm in reply msg 2022-11-24 11:01:26 +08:00
Minghao Li f9bf35c2f5 fix(sync): use local timestamp 2022-11-24 09:00:57 +08:00
Benguang Zhao f68e41a40e enh: initialize log buffer again after receiving a complete snapshot 2022-11-23 15:57:40 +08:00
Minghao Li 2b411912d9 refactor(sync): can not propose when heartbeat timeout 2022-11-23 14:17:13 +08:00
Minghao Li 1d48426e94 refactor(sync): del wal in multi-replicas 2022-11-22 12:45:31 +08:00
Benguang Zhao b90ee79623 fix: use syncLogBufferCommit in syncNodeOnLocalCmd 2022-11-21 13:51:01 +08:00
Minghao Li ff2a0db9f7 refactor(sync): fix asan error 2022-11-18 18:58:50 +08:00
Minghao Li 788a103132 refactor(sync): optimize leader transfer 2022-11-18 18:42:08 +08:00
Benguang Zhao c9c05761d6 enh: rename syncLogToAppendEntries to syncBuildAppendEntriesFromRaftLog 2022-11-18 12:40:00 +08:00
Benguang Zhao 03b88ff41c enh: rename syncLogBuffer.h|c to syncPipeline.h|c 2022-11-18 12:39:04 +08:00
Shengliang Guan 37580fc4c9
Merge pull request #18254 from taosdata/feature/3.0_mhli
fix(sync): fix elect bug
2022-11-18 12:00:13 +08:00
Minghao Li 3306785e60 fix(sync): fix elect bug 2022-11-18 11:06:35 +08:00
Shengliang Guan 7edde3a780 test: add log and asan case 2022-11-18 10:04:28 +08:00
Benguang Zhao 363cbc8985 fix: update cbMeta rsp handle info in syncLogFsmExecute 2022-11-18 09:37:58 +08:00
Benguang Zhao 4526ff2876 enh: add syncLogBuffer.h and syncLogBuffer.c 2022-11-17 23:37:02 +08:00
Benguang Zhao da469149db enh: debug to info 2022-11-17 20:28:18 +08:00
Benguang Zhao 051b73c1ed Merge branch 3.0 to FIX/TD-19334-3.0 2022-11-17 17:28:11 +08:00
Minghao Li effc38d217 fix(sync): fix asan error, use rid in hbdata and syncnode 2022-11-17 14:51:32 +08:00
Shengliang Guan b7ba43ea5a
Merge pull request #18206 from taosdata/fix/fix-hb-timer
fix(sync): fix hb-timer heap-use-after-free
2022-11-16 18:08:42 +08:00
Shengliang Guan 3fedd9106f
Merge pull request #18204 from taosdata/fix/TD-20480
fix: restore wal info changes
2022-11-16 16:51:26 +08:00
Minghao Li 84c9b79b4d fix(sync): fix hb-timer heap-use-after-free 2022-11-16 16:12:35 +08:00
Shengliang Guan 201ce10fbc fix: restore wal info changes 2022-11-16 15:45:40 +08:00
Benguang Zhao 3e13cd8280 fix: check if timer triggered ahead of time in syncNodeElect 2022-11-16 14:26:18 +08:00
Minghao Li 81592dfb09 fix(sync): fix hb-timer memory leak 2022-11-16 14:25:21 +08:00
Minghao Li 7bcd13e82a fix(sync): fix elect timer memory leak 2022-11-16 14:05:34 +08:00
Shengliang Guan 3ada61c346 restore some invalid code modify 2022-11-16 11:13:53 +08:00
Shengliang Guan aab1ec632c fix: heap-use-after-free in syncNodeEqPingTimer 2022-11-15 22:29:59 +08:00
Shengliang Guan 6c0bbe684b fix: heap-use-after-free in syncNodeEqPingTimer 2022-11-15 22:28:03 +08:00
Minghao Li 7d63efd2af refactor(sync): optimize, make LRU Cache hit more 2022-11-15 19:24:43 +08:00
Minghao Li c5aa7e072d refactor(sync): optimize, make LRU Cache hit more 2022-11-15 19:17:28 +08:00
Minghao Li 9e8404f60a refactor(sync): adjust timer 2022-11-15 17:50:15 +08:00
Benguang Zhao bf634a840d enh: check lastVer and commit version during syncNodeOpen 2022-11-15 17:13:31 +08:00
Shengliang Guan a57efc49b4 fix: memory leak of sync timer 2022-11-15 13:43:30 +08:00
Benguang Zhao c0c1cd8211 enh: reset sync log repl mgr if restarting of the peer detected in HeartbeatReply 2022-11-15 10:24:11 +08:00
Minghao Li 76628a52e6 fix(sync): do not use SNError 2022-11-14 17:33:48 +08:00
Minghao Li ac8eeb87af refactor(sync): modify error log 2022-11-14 17:19:20 +08:00
Minghao Li 9b58176c58 fix(sync): fix AddressSanitizer error: TD-20372 2022-11-14 15:56:34 +08:00
Shengliang Guan 11c3463814 refact: adjust sync code struct 2022-11-13 18:18:46 +08:00
Shengliang Guan 4940080a1c refact: adjust sync log prints 2022-11-13 18:00:11 +08:00
Shengliang Guan f1a41f5a37 refact: sync message headfile 2022-11-13 17:21:30 +08:00
Shengliang Guan f2191363b4 refact: sync local cmd msg 2022-11-13 17:14:03 +08:00
Shengliang Guan d37d83ee26 refact: adjust sync leadertransfer msg 2022-11-13 17:00:47 +08:00
Shengliang Guan fd7a499946 refact: adjust sync snapshotsend rsp 2022-11-13 16:41:40 +08:00
Shengliang Guan eec0ab8c8d refact: adjust sync snapshotsend msg 2022-11-13 16:39:21 +08:00
Shengliang Guan 973fc99f75
Merge pull request #18094 from taosdata/feature/3.0_mhli
refactor(sync): pre snapshot
2022-11-13 15:38:33 +08:00
Shengliang Guan 6681099245 refact: build sync heartbeat reply 2022-11-12 21:31:01 +08:00
Shengliang Guan 55927eaf0d refact: build sync heartbeat msg 2022-11-12 20:37:15 +08:00
Shengliang Guan 94076e5919 refact: adjust sync append entry 2022-11-12 20:29:49 +08:00
Shengliang Guan 54e05aee26 enh: adjust sync append entry reply 2022-11-12 18:21:58 +08:00
Shengliang Guan 2dfc970572 enh: adjust sync append entry msg 2022-11-12 16:40:09 +08:00
Shengliang Guan 5b46cbefe9 enh: adjust request vote reply 2022-11-12 15:24:49 +08:00
Shengliang Guan cd19ff0173 enh: adjust request vote reply 2022-11-12 13:17:56 +08:00
Shengliang Guan 8cca68f29d enh: adjust request vote msg 2022-11-12 12:58:08 +08:00
Shengliang Guan 26cb3c3856 refact: remove sync batch codes 2022-11-12 12:26:56 +08:00
Shengliang Guan 2da7eac62d refact: adjust timeout msg build 2022-11-12 10:21:16 +08:00
Benguang Zhao def4058eb1 feat: impl pipelining negotiation 2022-11-11 22:55:21 +08:00
Minghao Li 352c2d8ec0 refactor(sync): pre snapshot 2022-11-11 20:46:30 +08:00
Shengliang Guan a18c731cd0 refact: remove sync ping and pingreply 2022-11-11 17:35:04 +08:00
Shengliang Guan f7d263862b refact: remove assert and adjust log 2022-11-10 11:26:52 +08:00
Shengliang Guan efbe9ecbdc
Merge pull request #17999 from taosdata/fix/TD-20052
refact: move sync test code to single lib and reduce the number of memory copies
2022-11-09 19:14:33 +08:00
Shengliang Guan 4646640a11
Merge pull request #18001 from taosdata/fix/sync
fix(sync): fix AddressSanitizer error
2022-11-09 19:13:48 +08:00
Shengliang Guan fdad108726 Merge branch '3.0' into fix/TD-20052 2022-11-09 18:02:46 +08:00
Minghao Li 153c01ee73 fix(sync): fix AddressSanitizer error 2022-11-09 17:38:46 +08:00
Shengliang Guan f2fd847414 refact: move sync test code to single lib 2022-11-09 17:35:22 +08:00
Minghao Li fcc50467f4 fix(sync): fix AddressSanitizer error 2022-11-09 17:33:22 +08:00
Shengliang Guan 340bad7e99 Merge branch '3.0' into fix/TD-20052 2022-11-09 17:29:24 +08:00
Minghao Li d672e7a05c refactor(sync): add FpApplyQueueItems in fsm 2022-11-09 16:18:28 +08:00
Shengliang Guan 15e7e345dc refact: move sync test code to single lib 2022-11-09 14:45:07 +08:00