Skip to content

Full index can fail while restoring FTS triggers after graph finalization #5012

Description

@Widthdom

English

Symptom

A full incremental cdidx index . --json --no-progress run against an existing large database completed file scanning and spent about 69 minutes finalizing the reference graph, then exited with code 99:

Error: command failed before it could complete. Run `cdidx report` for details.

The bounded redacted last-failure.json recorded:

System.InvalidOperationException
Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader
Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery
CodeIndex.Database.DbWriter.Execute
CodeIndex.Database.DbWriter.RestoreFtsSyncTriggers
CodeIndex.Database.FtsBulkLoadTriggerGuard.Dispose
CodeIndex.Cli.IndexCommandRunner.RunFullScan

The database remained readable after rollback, had no WAL, and status --check --json reported the prior stale/incomplete generation. cdidx report generated a bundle but excluded the current failure as invalid, despite the saved failure event matching the command time and binary version.

Expected

FTS synchronization triggers should be restored without an unhandled exception after graph finalization. If restoration cannot proceed, indexing should retain the original actionable failure and cdidx report should include the bounded failure event.

Notes

  • Observed with local version 1.40.3 on macOS/arm64.
  • The failure occurred during repository index maintenance and is unrelated to the audit SARIF byte-budget changes in PR Honor JSON byte budgets for audit SARIF #5011.
  • Searches of open issues for RestoreFtsSyncTriggers, FtsBulkLoadTriggerGuard, FTS trigger failures, and index exit 99 found no duplicate.

日本語

事象

既存の大規模 DB に対して cdidx index . --json --no-progress を実行すると、全ファイル走査後に約69分間参照グラフを確定したのち、終了コード99で失敗しました。

匿名化済みの last-failure.json では、DbWriter.RestoreFtsSyncTriggers から FtsBulkLoadTriggerGuard.DisposeIndexCommandRunner.RunFullScan へ至る System.InvalidOperationException が記録されています。

rollback 後も DB は読み取り可能で WAL はなく、status --check --json は以前の stale / incomplete generation を報告しました。また cdidx report は bundle を生成しましたが、今回の保存済み failure event を invalid として除外しました。

期待結果

参照グラフ確定後に FTS 同期 trigger を未処理例外なしで復元できること。復元できない場合は、元の実行可能な診断を保持し、cdidx report が上限付き failure event を収録すること。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions