Commit 29ef8a5
fix: simplify commitIndexSegments to use Lance core's atomic replacement
Lance core's commitExistingIndexSegments already handles atomic
replacement — it finds existing segments with overlapping fragments
and removes them in the same CreateIndex transaction. The Spark-side
manual cleanup (second dataset open + removal transaction) was
redundant and introduced a race condition.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent fbe05fb commit 29ef8a5
1 file changed
Lines changed: 5 additions & 45 deletions
File tree
- lance-spark-base_2.12/src/main/scala/org/apache/spark/sql/execution/datasources/v2
Lines changed: 5 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
210 | 209 | | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
214 | 213 | | |
215 | 214 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 215 | + | |
| 216 | + | |
257 | 217 | | |
258 | 218 | | |
259 | 219 | | |
| |||
0 commit comments