16 Apr, 2026

1 commit


14 Apr, 2026

1 commit


09 Apr, 2026

1 commit

  •   - 数据转换放到 scripts/data_import/README.md
      - 诊断巡检放到 scripts/inspect/README.md
      - 运维辅助放到 scripts/ops/README.md
      - 前端辅助服务放到 scripts/frontend/frontend_server.py
      - 翻译模型下载放到 scripts/translation/download_translation_models.py
      - 临时图片补 embedding 脚本收敛成
        scripts/maintenance/embed_tenant_image_urls.py
      - Redis 监控脚本并入 redis/,现在是 scripts/redis/monitor_eviction.py
    
      同时我把真实调用链都改到了新位置:
    
      - scripts/start_frontend.sh
      - scripts/start_cnclip_service.sh
      - scripts/service_ctl.sh
      - scripts/setup_translator_venv.sh
      - scripts/README.md
    
      文档里涉及这些脚本的路径也同步修了,主要是 docs/QUICKSTART.md 和
    translation/README.md。
    tangwang
     

07 Apr, 2026

1 commit

  • - consolidate suggestion rebuild flow into build_suggestions.sh via --rebuild and remove the redundant rebuild_suggestions.sh wrapper
    - make suggestion versioned index names use microseconds and handle index-create retries/timeouts without false already_exists failures
    - treat create requests as successful when the index was created server-side, then explicitly wait for shard readiness and surface allocation diagnostics
    - clean up freshly created suggestion indices on rebuild failure to avoid leaving red orphan indices behind
    - make rebuild smoke tests target the local backend by default, with SUGGESTIONS_SMOKE_BASE_URL as the explicit override
    - add unit coverage for microsecond versioned index names and cleanup on unallocatable index failures
    tangwang
     

31 Mar, 2026

1 commit


27 Mar, 2026

1 commit


26 Mar, 2026

1 commit


19 Mar, 2026

2 commits

  • tangwang
     
  • - Text and image embedding are now split into separate
      services/processes, while still keeping a single replica as requested.
    The split lives in
    [embeddings/server.py](/data/saas-search/embeddings/server.py#L112),
    [config/services_config.py](/data/saas-search/config/services_config.py#L68),
    [providers/embedding.py](/data/saas-search/providers/embedding.py#L27),
    and the start scripts
    [scripts/start_embedding_service.sh](/data/saas-search/scripts/start_embedding_service.sh#L36),
    [scripts/start_embedding_text_service.sh](/data/saas-search/scripts/start_embedding_text_service.sh),
    [scripts/start_embedding_image_service.sh](/data/saas-search/scripts/start_embedding_image_service.sh).
    - Independent admission control is in place now: text and image have
      separate inflight limits, and image can be kept much stricter than
    text. The request handling, reject path, `/health`, and `/ready` are in
    [embeddings/server.py](/data/saas-search/embeddings/server.py#L613),
    [embeddings/server.py](/data/saas-search/embeddings/server.py#L786), and
    [embeddings/server.py](/data/saas-search/embeddings/server.py#L1028).
    - I checked the Redis embedding cache. It did exist, but there was a
      real flaw: cache keys did not distinguish `normalize=true` from
    `normalize=false`. I fixed that in
    [embeddings/cache_keys.py](/data/saas-search/embeddings/cache_keys.py#L6),
    and both text and image now use the same normalize-aware keying. I also
    added service-side BF16 cache hits that short-circuit before the model
    lane, so repeated requests no longer get throttled behind image
    inference.
    
    **What This Means**
    - Image pressure no longer blocks text, because they are on different
      ports/processes.
    - Repeated text/image requests now return from Redis without consuming
      model capacity.
    - Over-capacity requests are rejected quickly instead of sitting
      blocked.
    - I did not add a load balancer or multi-replica HA, per your GPU
      constraint. I also did not build Grafana/Prometheus dashboards in this
    pass, but `/health` now exposes the metrics needed to wire them.
    
    **Validation**
    - Tests passed: `.venv/bin/python -m pytest -q
      tests/test_embedding_pipeline.py
    tests/test_embedding_service_limits.py` -> `10 passed`
    - Stress test tool updates are in
      [scripts/perf_api_benchmark.py](/data/saas-search/scripts/perf_api_benchmark.py#L155)
    - Fresh benchmark on split text service `6105`: 535 requests / 3s, 100%
      success, `174.56 rps`, avg `88.48 ms`
    - Fresh benchmark on split image service `6108`: 1213 requests / 3s,
      100% success, `403.32 rps`, avg `9.64 ms`
    - Live health after the run showed cache hits and non-zero cache-hit
      latency accounting:
      - text `avg_latency_ms=4.251`
      - image `avg_latency_ms=1.462`
    tangwang
     

18 Mar, 2026

1 commit


13 Mar, 2026

4 commits


12 Mar, 2026

2 commits


11 Mar, 2026

4 commits

  • tangwang
     
  • 去掉 START_* 控制变量逻辑,默认只启动核心服务 backend/indexer/frontend。
    可选服务改为显式命令:./scripts/service_ctl.sh start embedding
    translator reranker tei cnclip。
    统一 translator 端口读取为 TRANSLATION_PORT(移除 TRANSLATOR_PORT
    兼容)。
    保留未知服务强校验。
    关键文件:service_ctl.sh
    “重名/歧义”修复
    frontend 端口命名统一:FRONTEND_PORT 为主,PORT 仅后备。
    start_frontend.sh 显式导出 PORT="${FRONTEND_PORT}",避免配置了
    FRONTEND_PORT 但服务仍跑 6003 的问题。
    文件:start_frontend.sh、frontend_server.py、env_config.py
    日志/PID 命名治理继续收口
    统一规则继续落地为 logs/<service>.log、logs/<service>.pid。
    cnclip 保持 logs/cnclip.log + logs/cnclip.pid。
    文件:service_ctl.sh、start_cnclip_service.sh、stop_cnclip_service.sh
    backend/indexer 启动风格统一补齐相关项
    frontend/translator 也对齐到 set -euo pipefail,并用 exec 直启主进程。
    文件:start_frontend.sh、start_translator.sh、start_backend.sh、start_indexer.sh
    legacy 入口清理
    删除:start_servers.py、stop_reranker.sh、stop_translator.sh。
    reranker 停止逻辑并入 service_ctl(含 VLLM::EngineCore 清理)。
    benchmark 脚本改为统一入口:service_ctl.sh stop reranker。
    文件:benchmark_reranker_1000docs.sh
    tangwang
     
  • tangwang
     
  • tangwang
     

10 Mar, 2026

2 commits

  • tangwang
     
  • 1. 新增 `scripts/init_env.sh`
    - 若 `.env` 不存在,从 `.env.example` 复制生成
    - 支持 `--force`:覆盖 `.env` 并备份为 `.env.bak`
    - 首次搭建时统一执行:`./scripts/init_env.sh`
    
     2. 统一加载逻辑 `scripts/lib/load_env.sh`
    - 移除 `activate.sh` 和 `service_ctl.sh` 中的重复解析逻辑
    - 使用共享的 `load_env_file`,并改为 `eval "$(printf 'export %s=%q\n'
      "$key" "$value")"` 安全导出
    - 支持含 ``、`$`、空格等特殊字符的值(需在 `.env` 中用引号包裹)
    
     3. 使用方式
    - **activate.sh**:`source scripts/lib/load_env.sh` 后调用
      `load_env_file`
    - **service_ctl.sh**:同上,去掉内联的 `load_env_file` 实现
    - **create_tenant_index.sh**:改为使用共享 loader,不再用 `set -a;
      source .env`
    
     4. 文档更新
    - **README.md**:在快速开始中加入 `./scripts/init_env.sh`
    - **docs/QUICKSTART.md**:说明 `init_env.sh`
      用法,并强调含特殊字符的密码需加引号
    - **.env.example**:补充注释说明引号规则
    
     5. setup.sh
    - 用 `./scripts/init_env.sh` 替代原先的 `cp .env.example .env`
    
    ---
    
    **推荐流程**:
    ```bash
    ./scripts/create_venv.sh
    ./scripts/init_env.sh     从 .env.example 生成本地 .env
    source activate.sh
    ./run.sh
    ```
    
    **密码写法**:若密码包含 ``、`$`、`&`、空格等,需加引号,例如:
    ```env
    DB_PASSWORD="qY8tgodLoA&KTyQ"
    ES_PASSWORD="4hOaLaf41y2VuI8y"
    ```
    tangwang
     

09 Mar, 2026

2 commits


07 Mar, 2026

1 commit