Repository navigation
perf(backup): LanceDB dump で既存キャッシュを直接使用 - #560
Conversation
…ng from DB
createDump lancedb mode now checks for an existing cache directory
(.cache/lancedb-cache/source-{id}/). When found, the cache is
tarred directly without DB queries or writeToLanceDB rebuild.
Falls back to the original rebuild path when cache is unavailable.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
このプルリクエストでは、targetMode が "lancedb" の場合にローカルキャッシュを利用して高速にバックアップ(TARアーカイブ)を作成する処理が追加されました。キャッシュが存在しない場合は、従来通りデータベースから再構築するフォールバック処理が実行されます。レビューでは、キャッシュ存在確認の厳密化(manifest.json の確認)やエラーハンドリングによる安全なフォールバックの確保、画像の並列ダウンロードによるパフォーマンス向上、およびメモリ上限(OOM)対策として一時ディレクトリへの書き出しを行うことなどが提案されています。また、アーカイブ作成中のキャッシュ書き込みとの競合を防ぐための排他制御や一時コピーの作成についても指摘されています。
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
- Check manifest.json instead of just directory existence - Wrap cache path in try-catch for safe fallback to DB rebuild - Parallelize image downloads with Promise.all - Only readMediaFilePaths when includeImages is true
概要
createDump の lancedb モードで、既存の LanceDB キャッシュディレクトリを直接 tar にパッケージするように最適化します。
変更内容
技術詳細
syncSourceLanceDBCache / syncSourceLanceDBDeltaCache が常時最新のキャッシュを維持しているため、dump 時の再構築は不要。metadata only dump でも DB に全件クエリが飛っていた問題を解消します。