server: Discovery store is only persisted on clean shutdown
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 server/app/services/run_discovery.py 和 DiscoveryStore.to_file() 的实现,然后检查 post_all_asset_links_by_id 和 delete_all_asset_links_by_id,了解它们如何更新内存中的存储。检查持久化模式如何配置 storage_path;如果服务异常停止后,成功的 POST 或 DELETE 仍然可用,则表示完成。如果不选择在写入时持久化,README 中仅修改文档的方案是一个替代选项。
由索引模型根据 Issue 内容生成。
描述
The discovery service writes its store to storage_path only in an
atexit hook:
The write handlers post_all_asset_links_by_id and
delete_all_asset_links_by_id only change the in-memory dicts.
The discovery_standalone README describes a "Persistent Mode" but
does not say that changes are written only at shutdown:
Expected behavior: In persistent mode, a successful POST or DELETE
on /lookup/shells/{aasIdentifier} survives a crash of the service.
Actual behavior: Changes reach the disk only on a clean shutdown.
If the process is killed (OOM, docker kill, host crash, uWSGI worker
crash), all asset links registered since startup are lost.
Environment: develop @ 2773ac06, image built from
server/docker/discovery/Dockerfile with storage_path set.
Options:
- Persist on every write: call
DiscoveryStore.to_file()at the end
of both write handlers and drop theatexithook.to_file()
already writes a temp file and usesos.replace(), so the write is
atomic. - Keep the current behavior and document it: state in the README
that changes are saved only on a clean shutdown and that a crash
loses everything since the last start.
Option 1 is a small change and makes "persistent mode" mean what users
expect, so I would prefer it.
- 主要语言
- Python
- 星标
- 107
- 派生
- 61
- 平均合并
- 49 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-basyx/basyx-python-sdk 的其他 Issue
-
adapter.json, adapter.xml: Falsy Extension and Qualifier values omitted可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
eclipse-basyx/basyx-python-sdk#682 ·
维护者通常 1 天内回复
-
server: XML responses contain `cursor="None"` on the last page可能已有人在做 @qiaobochi040726-source 于 10 天前认领。 未关闭bug good-first-issue server
难度 2/5 1-3 小时 新手友好度 82/100
eclipse-basyx/basyx-python-sdk#673 ·
维护者通常 1 天内回复
-
adapter.aasx: Failsafe writer adds duplicate parts for conflicting files可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug good-first-issue sdk
难度 2/5 1-3 小时 新手友好度 85/100
eclipse-basyx/basyx-python-sdk#671 ·
维护者通常 1 天内回复
-
enhancement good-first-issue server
难度 2/5 1-3 小时 新手友好度 80/100
eclipse-basyx/basyx-python-sdk#670 ·
维护者通常 1 天内回复
-
adapter.aasx: Missing supplementary file aborts reading with failsafe可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug good-first-issue sdk
难度 2/5 1-3 小时 新手友好度 76/100
eclipse-basyx/basyx-python-sdk#665 ·
维护者通常 1 天内回复
查看 eclipse-basyx/basyx-python-sdk 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
Nixtla/mlforecast#823 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
microsoft/ML-For-Beginners#1061 ·
-
bot-found documentation priority: P3
难度 2/5 1 小时以内 新手友好度 82/100
madenvel/KalinkaPlayer#503 ·
-
难度 2/5 1-3 小时 新手友好度 63/100
EleutherAI/lm-evaluation-harness#4508 ·
维护者通常 1 天内回复