Commit Graph

657 Commits

Author SHA1 Message Date
Minghao Li 18b78f2450 refactor(sync): add return code restore from snapshot 2022-06-29 14:50:59 +08:00
Minghao Li 4bd650609d refactor(sync): delete old functions 2022-06-29 14:02:40 +08:00
Minghao Li aded474d5b refactor(sync): adjust trace log 2022-06-28 16:19:15 +08:00
Minghao Li 33d1440e7b refactor(sync): adjust trace log 2022-06-28 14:23:45 +08:00
Minghao Li 4c410bd5ec refactor(sync): refactor snapshot code 2022-06-28 11:33:14 +08:00
Minghao Li 2647ec21e0 refactor(sync): add comments in snapshot 2022-06-27 20:23:08 +08:00
Minghao Li 5e7b7cb449 refactor(sync): add entries cache 2022-06-27 16:56:36 +08:00
Minghao Li 49ff32cda5 refactor(sync): add entries cache 2022-06-27 16:53:02 +08:00
Minghao Li a22814a5a7 refactor(sync): optimized one replica 2022-06-27 10:36:28 +08:00
Minghao Li 6eecbcd1a6 refactor(sync): optimized one replica 2022-06-26 01:16:11 +08:00
Minghao Li a6f33ba01c refactor(sync): optimized one replica 2022-06-25 20:31:42 +08:00
Minghao Li 77b365f0cc refactor(sync): do not replicate when one replica 2022-06-25 16:27:05 +08:00
Minghao Li 0df1415caf refactor(sync): add trace log 2022-06-25 11:30:34 +08:00
Minghao Li 58296f6a5a refactor(sync): adjust log buf size 2022-06-24 16:44:45 +08:00
Minghao Li 87defc2790 refactor(sync): add interface: get retry epset 2022-06-24 14:26:31 +08:00
Minghao Li 8a8e42a923 refactor(sync): set error code in syncIsReady 2022-06-24 14:04:58 +08:00
Minghao Li 8060108585 refactor(sync): add trace log 2022-06-24 13:50:23 +08:00
Minghao Li b3fa103cb9 refactor(sync): add trace log 2022-06-24 11:36:26 +08:00
Minghao Li 3d9ffc42e8 refactor(sync): refactor wal abstraction 2022-06-23 21:16:16 +08:00
Minghao Li f140a5ad1b refactor(sync): add trace log 2022-06-23 16:57:18 +08:00
Minghao Li 4fdc62a27f refactor(sync): delete fake match branch 2022-06-23 16:32:06 +08:00
Minghao Li 00c0926c44 refactor(sync): hold wal handle with log store 2022-06-23 14:58:52 +08:00
Minghao Li cdb6b2429a refactor(sync): update election timer range 2022-06-23 14:37:29 +08:00
Minghao Li e18329ac19 refactor(sync): update election timer range 2022-06-23 14:22:53 +08:00
Minghao Li ca4d7329ce refactor(sync): modify wal error log 2022-06-23 14:07:18 +08:00
Minghao Li 81eae2a9af refactor(sync): modify wal error log 2022-06-23 11:59:28 +08:00
Minghao Li e051bc51db refactor(sync): add trace log 2022-06-23 11:23:44 +08:00
Minghao Li a701451a27 refactor(sync): add trace log 2022-06-23 11:09:01 +08:00
Minghao Li 9786ba2fbe fix(sync): update nextindex, matchindex when backto nolog 2022-06-23 10:10:57 +08:00
Minghao Li 2f2715aca4 fix(sync): save saveErr 2022-06-22 20:23:49 +08:00
Minghao Li 13c916f5cb fix(sync): update lcindex to -1, when get error 2022-06-22 19:48:36 +08:00
Minghao Li 7b5a3eff3f refactor(sync): add syncLogStoreCheck tool 2022-06-22 10:42:54 +08:00
Minghao Li 0ba3326b99 fix(sync): update commit index when apply snapshot 2022-06-22 10:35:39 +08:00
Minghao Li 1f0d7807ac fix(sync): sender get config from local 2022-06-21 19:27:52 +08:00
Minghao Li 4381c3620d refactor(sync): calculate index after append entry 2022-06-21 19:00:24 +08:00
Minghao Li 363c98e9ed refactor(sync): abstract for log store 2022-06-21 17:45:08 +08:00
Minghao Li ecc43b6697 refactor(sync): delete some assert 2022-06-21 16:02:36 +08:00
Minghao Li b61a5cd126 refactor(sync) add trace log 2022-06-21 15:30:24 +08:00
Minghao Li 0fb64add90 refactor(sync) add trace log 2022-06-21 15:09:23 +08:00
Minghao Li 6c71ae8985 fix(sync): config change when set index-mgr 2022-06-21 13:23:35 +08:00
Shengliang Guan e87baa8df7 Merge remote-tracking branch 'origin/3.0' into fix/mnode 2022-06-21 11:42:11 +08:00
Shengliang Guan 714c599fd7 fix: deadlock while set standby 2022-06-21 11:40:27 +08:00
Minghao Li 50e3527f2b refactor(sync): set ranmdom seed by ns 2022-06-21 11:11:16 +08:00
Minghao Li 3b7e0bfdcc fix(sync): set standby when not follower 2022-06-20 20:55:40 +08:00
Minghao Li 9f76504830 refactor(sync): propose fail when changing 2022-06-20 20:10:13 +08:00
Minghao Li 3573ae1564 refactor(sync): block when changing 2022-06-20 20:07:36 +08:00
Minghao Li e441bd266b refactor(sync): add changing state 2022-06-20 17:48:56 +08:00
Minghao Li 5968c6353f refactor(sync): get snapshot and create reader 2022-06-20 10:58:59 +08:00
Minghao Li 16930ac3aa refactor(sync): adjust log buf size 2022-06-18 18:42:40 +08:00
Minghao Li f5366425ed refactor(sync): append noop in become leader 2022-06-18 17:02:29 +08:00
Minghao Li b247762931 refactor(sync) refactor trace log 2022-06-18 15:17:58 +08:00
Shengliang Guan db4e02c7c7 fix: add log to debug mnode sync 2022-06-17 15:23:17 +08:00
Shengliang Guan ab2f268601 Merge branch 'fix/tsim' into fix/dnode 2022-06-17 14:53:04 +08:00
Shengliang Guan 43f8f34b0f refactor: adjust logs 2022-06-17 14:24:17 +08:00
Shengliang Guan 6e6f559f9c Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-17 14:06:44 +08:00
Minghao Li 9ab28e0b88 refactor(sync): add last config index in fsm cbMeta 2022-06-17 14:05:52 +08:00
Shengliang Guan ce08a98149 Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-17 13:09:19 +08:00
Minghao Li 455a8da0ad refactor(sync): add config index to json 2022-06-17 13:08:41 +08:00
Shengliang Guan 7e0ad8781b refactor(sync) add raft cfg test 2022-06-17 11:46:19 +08:00
Shengliang Guan 28b3268224 fix(sync) add trace log 2022-06-17 11:40:18 +08:00
Minghao Li f5db109e61 fix(sync): get last max snapshot index 2022-06-17 11:37:10 +08:00
Shengliang Guan 793e6fa7d9 fix: rollback to avoid tsim/basic.sim failure 2022-06-17 09:26:25 +08:00
Shengliang Guan e241fc0979 Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-16 21:13:35 +08:00
Minghao Li d71027ac35 fix(sync): fake match2, need truncate log 2022-06-16 20:43:49 +08:00
Shengliang Guan 2dc41e86cb Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-16 20:10:11 +08:00
Minghao Li b42c963a5f fix(sync): fake match when prevLogIndex less than commitIndex 2022-06-16 20:08:27 +08:00
Shengliang Guan 5d64fcb117 Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-16 19:47:40 +08:00
Minghao Li d3f6f07902 fix(sync): fake match when prevLogIndex less than commitIndex 2022-06-16 19:40:08 +08:00
Shengliang Guan dd024941b7 Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-16 19:10:52 +08:00
Minghao Li 3fdd0c30ac refactor(sync): add trace log 2022-06-16 19:08:44 +08:00
Shengliang Guan 5d9a3850d2 Merge remote-tracking branch 'origin/feature/3.0_mhli' into fix/dnode 2022-06-16 18:09:30 +08:00
Minghao Li 46c09f2c84 refactor(sync): add trace log 2022-06-16 18:08:01 +08:00
Shengliang Guan 34b6ecafba Merge remote-tracking branch 'origin/feature/3.0_mhli' into test/chr/TD-14699 2022-06-16 17:42:27 +08:00
Minghao Li 15ac89590c refactor(sync): add trace log 2022-06-16 17:41:01 +08:00
Shengliang Guan fe9f8bfe98 Merge remote-tracking branch 'origin/3.0' into test/chr/TD-14699 2022-06-16 17:39:39 +08:00
Shengliang Guan 26ca03af4f fix: crash while mnode sync 2022-06-16 17:24:42 +08:00
Shengliang Guan 35c47cee55 Merge remote-tracking branch 'origin/feature/3.0_mhli' into test/chr/TD-14699 2022-06-16 16:17:20 +08:00
Minghao Li 2f81a41f98 refactor(sync): add syncIsReady 2022-06-16 16:16:40 +08:00
Shengliang Guan 6ad87b9383 Merge remote-tracking branch 'origin/feature/3.0_mhli' into test/chr/TD-14699 2022-06-16 15:57:20 +08:00
Minghao Li 9a9200d28b refactor(sync): add restore finish when become leader again 2022-06-16 15:38:40 +08:00
Shengliang Guan 7aa087a48d feat: redistribute vgroup 2022-06-16 15:25:04 +08:00
Minghao Li 77b03ac821 refactor(sync): add restore finish when become leader again 2022-06-16 14:40:42 +08:00
Minghao Li 58051169d2 refactor(sync): add trace log 2022-06-16 10:54:13 +08:00
Shengliang Guan 19439c8b58 fix: adjust log 2022-06-15 19:55:36 +08:00
Minghao Li dcd65e6dea refactor(sync): do not heartbeat when 1 replica 2022-06-15 17:17:15 +08:00
Minghao Li 4b18bd718e refactor(sync): adjust errno 2022-06-15 16:14:17 +08:00
Minghao Li c9f6c20410 refactor(sync): if eqmsg error, return 2022-06-15 11:42:04 +08:00
Minghao Li 6c7072286d refactor(sync): if eqmsg error, return 2022-06-15 11:06:06 +08:00
Li Minghao c156d964b6
Merge pull request #13841 from taosdata/feature/3.0_mhli
refactor(sync): add respMgr trace log
2022-06-14 22:56:42 +08:00
Minghao Li a51eee06eb refactor(sync): add trace log 2022-06-14 20:39:53 +08:00
Minghao Li b60fde8f73 refactor(sync): add trace log 2022-06-14 20:33:57 +08:00
Minghao Li b25840ebd4 refactor(sync): add test syncRaftIdCheck 2022-06-14 20:19:56 +08:00
Minghao Li e4da993c15 refactor(sync): add test syncRaftIdCheck 2022-06-14 17:19:54 +08:00
Minghao Li 71dad1ea78 refactor(sync): add test syncRaftIdCheck 2022-06-14 15:50:44 +08:00
Li Minghao 41a285a3f6
Merge pull request #13807 from taosdata/feature/3.0_mhli
refactor(sync): update replica index in snapshot sender
2022-06-14 15:21:09 +08:00
Minghao Li fa25fa32e0 refactor(sync): add test syncRaftIdChec 2022-06-14 14:54:11 +08:00
Minghao Li 5268b5233a refactor(sync): update replica index in snapshot sender 2022-06-14 14:40:06 +08:00
Minghao Li a2039d8bb2 fix(sync) if FpEqMsg return error, do not enqueue msg 2022-06-14 13:16:49 +08:00
Minghao Li 979420801e fix(sync) if FpEqMsg return error, do not enqueue msg 2022-06-14 13:07:27 +08:00
Minghao Li 9cd54c5cc9 refactor(sync): update replica index in snapshot sender 2022-06-14 11:16:32 +08:00
Minghao Li 3887e940f1 fix(sync): when receive snapshot rsp from a dropped replica 2022-06-14 10:24:05 +08:00
Shengliang Guan 82112e8d4a
Merge pull request #13786 from taosdata/fix/mnode
fix(sync): send snapshot to multi nodes at the same time
2022-06-14 09:54:21 +08:00
Shengliang Guan 318f2771ea fix(sync): close detail log 2022-06-13 22:36:54 +08:00
Shengliang Guan be3de7b7df fix(sync): send snapshot to multi nodes at the same time 2022-06-13 22:20:53 +08:00
Minghao Li e4897e5f46 enh(sync): add leader transfer 2022-06-13 15:52:43 +08:00
Minghao Li f47a28fe8a enh(sync): add leader transfer 2022-06-13 15:47:43 +08:00
Xiaoyu Wang 1863bbee9a merge 3.0 2022-06-13 15:01:29 +08:00
Xiaoyu Wang 380a071551 fix: handle the memory leak of parser 2022-06-13 14:54:38 +08:00
Minghao Li b1093b4a79 fix(sync): use fqdn instead of raftId 2022-06-13 12:13:35 +08:00
Shengliang Guan 95e4b79091 feat: redistribute vgroup 2022-06-13 11:55:38 +08:00
Minghao Li 34c906a1e1 refactor(sync): add debug log 2022-06-13 10:39:32 +08:00
Minghao Li aad288ab17 refactor(sync): add debug log 2022-06-12 15:21:56 +08:00
Minghao Li 6a4cdadef6 refactor(sync): add debug log 2022-06-11 21:56:44 +08:00
Minghao Li f92f1bbcc0 fix(sync): snapshot overwrite config change 2022-06-11 16:20:15 +08:00
Minghao Li 104a1bb59b fix(sync): snapshot overwrite config change 2022-06-11 16:11:18 +08:00
Minghao Li dffbec29c7 refactor(sync): add last config index z 2022-06-11 15:31:49 +08:00
Minghao Li fa54663871 refactor(sync): add last config index 2022-06-11 13:52:17 +08:00
Minghao Li 4af9d14457 refactor(sync): add last config index 2022-06-11 13:08:30 +08:00
Minghao Li 6adadc0b26 refactor(sync): add last config index 2022-06-11 13:03:58 +08:00
Minghao Li 6586f78599 refactor(sync): add last config index 2022-06-11 12:44:58 +08:00
Minghao Li ae5219dd6e refactor(sync): add heartbeat log 2022-06-10 22:29:28 +08:00
Minghao Li 972fee7fbc refactor(sync): add rpcMsg to reconfig callback 2022-06-10 17:39:30 +08:00
Minghao Li e9d466ec82 refactor(sync) delete some trace log 2022-06-10 16:51:17 +08:00
Minghao Li 736862541e fix(sync): restart with config change 2022-06-10 15:19:11 +08:00
Minghao Li b351fd8261 refactor(sync): add log 2022-06-10 13:15:43 +08:00
Minghao Li 2c38692258 refactor(sync): add log 2022-06-10 11:28:41 +08:00
Minghao Li 3148df2107 fix(sync): compatibility for both mnode(use snapshot) and vnode(no snapshot) 2022-06-09 17:16:06 +08:00
Shengliang Guan 81e431b16a Merge branch 'feature/sync-refactor' of https://github.com/taosdata/TDengine into feature/sync-refactor 2022-06-09 16:33:43 +08:00
Minghao Li 9a61a567c5 refactor(sync): set gRaftDetailLog false 2022-06-09 16:32:37 +08:00
Shengliang Guan 0beb323653 Merge branch 'feature/sync-refactor' of https://github.com/taosdata/TDengine into feature/sync-refactor 2022-06-09 16:16:13 +08:00
Minghao Li 7ae6d8f77d refactor(sync): set gRaftDetailLog true 2022-06-09 14:18:57 +08:00
Minghao Li ee32302101 refactor(sync): add detail log flag 2022-06-09 14:14:45 +08:00
Shengliang Guan 65f65b53b3 Merge remote-tracking branch 'origin/3.0' into feature/sync-refactor 2022-06-09 13:49:43 +08:00
Minghao Li 4f7dc62433 refactor(sync): add detail log flag 2022-06-09 12:56:52 +08:00
Minghao Li d81f5e9f77 fix(sync): add detail log flag 2022-06-09 11:18:48 +08:00
Minghao Li 89e2c2d47a fix(sync): update sender when become leader 2022-06-09 11:00:28 +08:00
Minghao Li e070657778 refactor(sync): add syncGetSnapshotMeta 2022-06-08 23:20:07 +08:00
Minghao Li 61cc736ca0 fix(sync): create db core due to snapshot 2022-06-08 23:08:40 +08:00
Minghao Li e86ee68f8b refactor(sync): sync snapshot 2022-06-08 22:43:58 +08:00
Minghao Li 98a2451c15 refactor(sync): sync snapshot 2022-06-08 21:55:36 +08:00
Shengliang Guan bc8e6b7fd7 refactor: adjust vnode sync 2022-06-08 21:17:17 +08:00
Minghao Li 29b97fa0ad refactor(sync): syncNodeOnAppendEntriesReplySnapshotCb 2022-06-08 19:53:07 +08:00
Minghao Li aa107d03c3 refactor(sync): SSyncSnapshotReceiver 2022-06-08 18:17:17 +08:00
Minghao Li 76185e1742 refactor(sync): SSyncSnapshotSender 2022-06-08 18:07:50 +08:00
Minghao Li d72d2d698c refactor(sync): SyncAppendEntries 2022-06-08 17:44:32 +08:00
Minghao Li 39d0b652ba refactor(sync): add raft log test 2022-06-08 17:18:26 +08:00
Minghao Li 687caac2bf refactor(sync): add raft log test 2022-06-08 16:45:40 +08:00
Minghao Li f6aed44076 refactor(sync): syncNodeSendMsgById to one line 2022-06-08 13:52:33 +08:00
Minghao Li 77cd6f44f4 refactor(sync): syncUtilJson2Line 2022-06-08 11:25:24 +08:00
Minghao Li 2547e8d02e refactor: sync index 2022-06-08 11:03:28 +08:00