Skip to content

fix(storage): preserve UUID V2 default and avoid startup-wide registration - #42

Merged
servicememeai merged 8 commits into
devfrom
fix/v2-uuid-bootstrap-20261024
Oct 24, 2026
Merged

servicememeai merged 8 commits into
devfrom
fix/v2-uuid-bootstrap-20261024

Conversation

@servicememeai

@servicememeai servicememeai commented Oct 24, 2026 •

Copy link
Copy Markdown

Keep CloudFile V2's existing fresh-install default: CF_LIBRARY_STORAGE=auto, a single pre-existing parent mount, and UUID per-library physical directories. No new cf-local format or storage backend and no custom-directory alias.

Skip Hub full storage-reconcile on true fresh install and normal V2 restarts: Server #38 atomically writes native RepoStorageId + minimal UUID lost-route safety marker, so re-registering every repository is unnecessary. The existing explicit Seafile CE→V2 transition still performs its current preflight/registration checks. Never rewrite legacy custom V2 paths, start bulk backups or silently migrate stored objects.

One-off Python bootstrap + Docker Compose read-only tests passed; no service, user data or volume was touched. Keep Draft until matched Server/Hub/Docker runtime acceptance.

Copy link
Copy Markdown
Author

2026-10-24 三仓存储验收门禁复核

本 PR 的真实新装/既有 V2 正常重启不全库 reconcile、CE→V2 显式迁移预检方案继续保留;Head 39f5f276 轻量 CI 通过。配对候选为 Server #38(Head c9ff58d1)、Hub haiwen#79(Head 1f90fbaf)。不新增批量备份、额外表、后台对账或运行时 DDL。

尚未放行:需要在隔离真实 CE14 Docker/MariaDB 中执行 create repo → verify RepoStorageId=auto-local:<UUID> and UUID dir → write/read/check versions → old V2 custom-key open → original native CE open → cold GC/restart,检查 DB/FS 对象一致及未知 RPC 回执。东京远程 DEV 当前离线;请勿据 source CI 直接合并/部署。

@servicememeai
servicememeai marked this pull request as ready for review October 24, 2026 13:24
@servicememeai
servicememeai merged commit b9ec905 into dev Oct 24, 2026
1 check passed
@opendev9

Copy link
Copy Markdown

2026-10-24 合并门禁复核(真实 CE14 联合验收)

本 PR 合并进 dev 后,用三仓同组 Head 在隔离 CE14 + MariaDB 11.4 上验收,发现合并后的 dev 新装 V2 容器不健康,已由 follow-up cloudfile-docker#43 修复并合并(squash 7f7e7c3):

  • 现象:seafobj.exceptions.InvalidConfigError: unknown blocks backend "filesystem",seahub 起不来。
  • 根因:生成的 V2 配置用 C/Go 认的 name = filesystem,Python seafobj 只认 fs/s3/...;即使做名称映射,seafobj 仍会把所有库指向原生目录,V2 路由库对象读错位置。
  • 修复:patches/seafobj/automatic-local-storage.patch 识别 [cloudfile_v2] auto_local_root,复用 multiple-backend 机制(auto 模板 + native 默认);routed 库按 RepoStorageId 读 <root>/<key>/storage/<kind>;db.py 优先用环境完整 MySQL URL。

当前 dev 构建镜像的完整验收(Server 93d312a / Hub 7b42169 / Docker 7f7e7c3)

镜像 cloudfile/cloudfile:14.0.0-cf.devverify20261024(digest sha256:1535d53ca837),66/66 通过,其中启动/存储路径:

  • 新装 V2 健康;seafile.conf 正确;fresh 不跑全库 inventory(0 份 reconcile 报告)。
  • 正常 V2 重启不跑 inventory;显式 CE→V2 切换只跑一次有界 preflight。
  • 新库 UUID 路由/目录、上传下载、历史自定义 key 原址、失路由 fail-closed、原生 CE 库兼容、虚拟库、fsck/cold GC 全部通过。

另:与本 PR 无关的新装 schema 缺口(fork migrations 列缺失)已开 cloudfile-hub#82。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants