Commit fa53ff1
authored
fix(meta-service): detach the SysData to avoid race condition (#18722)
* fix(meta-service): detach the SysData to avoid race condition
When creating a new level in state-machine, it should detach the SysData
to avoid race condition with snapshot building.
Before this commit, the new writable level and the snapshot compactor
shares the same data thus the new applied data increases the
`last-log-id` of a new built snapshot. Result in a snapshot that
lacks some log entries it declares to have.
* M src/meta/raft-store/src/sm_v003/compact_immutable_levels_test.rs1 parent 9451238 commit fa53ff1
File tree
2 files changed
+23
-3
lines changed- src/meta/raft-store/src
- leveled_store
- sm_v003
2 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
0 commit comments