Commit 8d11a51
committed
refactor: move table-policy reference management to drop/undrop table
Move the table-policy reference lifecycle management from drop policy operations
to drop/undrop table operations. This simplifies the drop policy logic and improves
performance.
Key changes:
- drop_table: delete all table-policy references when marking table as dropped
- undrop_table: verify policies still exist, cleanup stale references, restore valid ones
- drop_policy: simplified from incremental cleanup (N/100+1 txns) to single existence check (1 txn)
All operations are protected by seq conditions for concurrent safety using optimistic
locking pattern.1 parent 94bed73 commit 8d11a51
File tree
6 files changed
+146
-232
lines changed- src/meta
- api/src
- app/src
- data_mask
- row_access_policy
6 files changed
+146
-232
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
| |||
161 | 159 | | |
162 | 160 | | |
163 | 161 | | |
164 | | - | |
| 162 | + | |
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
170 | 168 | | |
171 | 169 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 170 | + | |
| 171 | + | |
194 | 172 | | |
195 | 173 | | |
196 | | - | |
| 174 | + | |
197 | 175 | | |
198 | 176 | | |
199 | 177 | | |
200 | 178 | | |
201 | 179 | | |
202 | 180 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
227 | 184 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
231 | 188 | | |
232 | | - | |
233 | | - | |
| 189 | + | |
| 190 | + | |
234 | 191 | | |
235 | | - | |
236 | | - | |
| 192 | + | |
| 193 | + | |
237 | 194 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
243 | 198 | | |
| 199 | + | |
244 | 200 | | |
245 | 201 | | |
246 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
139 | 137 | | |
140 | 138 | | |
141 | 139 | | |
| |||
148 | 146 | | |
149 | 147 | | |
150 | 148 | | |
151 | | - | |
| 149 | + | |
152 | 150 | | |
153 | 151 | | |
154 | 152 | | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
158 | 156 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 157 | + | |
| 158 | + | |
181 | 159 | | |
182 | 160 | | |
183 | | - | |
| 161 | + | |
184 | 162 | | |
185 | 163 | | |
186 | 164 | | |
187 | 165 | | |
188 | 166 | | |
189 | 167 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
214 | 171 | | |
215 | | - | |
216 | | - | |
217 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
218 | 175 | | |
219 | | - | |
220 | | - | |
| 176 | + | |
| 177 | + | |
221 | 178 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
227 | 182 | | |
| 183 | + | |
228 | 184 | | |
229 | 185 | | |
230 | 186 | | |
| |||
0 commit comments