Export reads one row at a time without a snapshot, and import crashes on a locale for a non-localized type
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
调研方向
Start with the named transfer paths under src/FluentCMS.Core/: Content/EntryTransfer.cs, Transfer/TransferExporter.cs, Transfer/TransferImporter.cs, and the referenced store, service, import, and authorization files. Trace export queries and transaction handling, then follow how import handles locales and author fields; check the tests for each acceptance item. Done means all four behaviors meet the acceptance criteria and each has a test.
由索引模型根据 Issue 内容生成。
描述
Problem
- Export reads entries one row at a time. Only
cms_documentis read in chunks of 100 (Content/EntryTransfer.cs:67-69). Each locale row then callsstore.ReadAsyncper state (:82-83), 2–3 queries each (Content/EntryStore.cs:143-153): up to 6 queries per locale row. - Export is not a snapshot.
Transfer/TransferExporter.cs:125-140opens no transaction; ids, document rows and field rows are separate statements. A save during the export can pair an old version with new fields, or leave a reference to an entry missing from the package. - A non-localized item that carries a locale crashes. The locale is kept as sent (
Transfer/TransferImporter.cs:424-427) but the row is written under""(Content/ContentService.cs:1256), sowritten.Find(...)!throws aNullReferenceException(Content/ContentService.Import.cs:113-116). The item is reported as an unexpected failure. Only hand-made packages do this. - The package decides who owns imported entries. Keeping the author fields is specified (spec 4.14), but the own-entries rule keys on
CreatedBy(Authorization/AuthorizationBuilder.cs:16), and there is no way to import as oneself.
Paths are under src/FluentCMS.Core/.
Proposal
- Read shared rows, locale rows and references per chunk with
IN (ids). - Run the export in one snapshot or repeatable-read transaction.
- Refuse the line as an invalid item, with a message.
- Add
authors=keep|importerto import, defaultkeep.
Acceptance
- Exporting N entries issues a number of queries proportional to N / chunk size
- A save during an export does not change what the package contains
- A non-localized item with a locale is reported as invalid, not as an unexpected failure
-
authors=importerrecords the importer as creator and updater - Tests for each
Found in the code review of 17 Nov 2026.
- 主要语言
- C#
- 星标
- 567
- 派生
- 107
- 平均合并
- 1 小时 19 分钟
- 30 天内合并 PR
- 353
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fluentcms/FluentCMS 的其他 Issue
-
area:localization plugin type:bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area:storage type:bug
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
area:testing type:bug
难度 3/5 1-2 天 新手友好度 72/100
维护者通常 1 天内回复
-
area:api area:publishing type:feature
难度 4/5 3-5 天 新手友好度 55/100
fluentcms/FluentCMS#3473 · 1 条评论 ·
维护者通常 1 天内回复
-
area:storage plugin type:bug
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
查看 fluentcms/FluentCMS 的全部 Issue
相似的 Issue
-
worldInstancedOccluderNode reads its appendix count as one byte, but it is a VLQ可能已有人在做 @spuddeh 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
fix(ocr): compile the Tesseract-free pipeline with Tokio runtime可能已有人在做 @Goldziher 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
priority:P2
难度 2/5 1-3 小时 新手友好度 82/100
-
bug sev-5 vm
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 85/100