mirror of
https://github.com/labring/FastGPT.git
synced 2026-03-19 01:00:34 +08:00
* feat: add vector database migration solution between different vector DBs This PR implements a migration solution for transferring vector data between different vector databases (PostgreSQL, OceanBase, Milvus) as requested in #6196. Features: - Support offline (stop-the-world) migration mode - Export vectors from source DB with pagination - Import vectors to target DB with batch processing - Preserve original vector IDs when possible - Validate migration results by comparing counts - CLI script for command-line migration - Admin API endpoint for programmatic migration Files added: - packages/service/common/vectorDB/migration/ - Core migration logic - projects/app/src/pages/api/admin/migrateVector.ts - Admin API - scripts/migrateVector.ts - CLI migration script - .claude/design/vector-db-migration.md - Design document Closes #6196 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: address PR review security and stability issues - Fix SQL injection vulnerabilities in PgExporter and OceanBaseExporter by using parameterized queries instead of string concatenation - Add memory leak prevention with automatic cleanup of old migration states (24h retention, hourly cleanup) - Add concurrent migration limit (max 3 simultaneous migrations) - Add transaction protection for PostgreSQL and OceanBase batch imports - Improve error handling for connection cleanup phase - Fix SQL injection in deleteBatch methods Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
目录说明
该目录为 FastGPT 主项目。
-
app fastgpt 核心应用。
-
sandbox 沙盒项目,用于运行工作流里的代码执行 (需求python环境为python:3.11,额外安装的包请于requirements.txt填写,在运行时会读取安装。
-
注意个别安装的包可能需要额外安装库(如pandas需要安装libffi))。
-
新加入python的包遇见超时或者权限拦截的问题(确定不是自己的语法问题),请进入docker容器内部执行以下指令:
docker exec -it 《替换成容器名》 /bin/bash chmod -x testSystemCall.sh bash ./testSystemCall.sh然后将新的数组替换或追加到src下sandbox的constants.py中的SYSTEM_CALLS数组即可
-