fix(state): finalize empty FTS rebuild markers
Clear zero-row rebuild markers so empty databases can finish teardown and stamp the new layout. Extend the migration regression through close/reopen recovery for both empty and populated databases.
This commit is contained in:
@@ -348,7 +348,9 @@ class SessionSearchMixin:
|
||||
return True # transient (lock contention) — caller retries
|
||||
if more is False:
|
||||
status = self.fts_rebuild_status()
|
||||
if status is not None and status["indexed"] >= status["total"]:
|
||||
if high_water <= 0 or (
|
||||
status is not None and status["indexed"] >= status["total"]
|
||||
):
|
||||
self._fts_rebuild_finish()
|
||||
return False
|
||||
return bool(more)
|
||||
|
||||
Reference in New Issue
Block a user