docs.rs failed to build pi_append_log-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
pi_append_log-0.1.0
pi_append_log
当前版本提供追加日志公共 trait、默认 V1 块 codec、固定八位文件 Layout 和文件存储实现;网络与对象存储后端尚未实现。文件 segment 使用无后缀的八位编号,最大编号是 active,其余编号是 closed;允许结构编号缺号,rotate 保留旧 segment 并创建下一个编号。archive 使用同一 namespace 内的 rename,暂不支持跨磁盘 copy。
文件后端基于 pi_async_fs,公共错误使用 pi_result。append 接受任意 DetachableWriteBuffer,append_stream 支持把异步 chunk 流作为一个连续逻辑 block 写入。首个非空 chunk 的首次底层 append 开始前取消或 stream 错误不使 namespace 失效;开始写入后发生错误或取消会保留已写前缀并使共享 namespace 进入 InvalidState,调用方必须重建。测试使用 Tokio,库本身不绑定具体异步运行时。
本库只发出 tracing 事件;应用可通过 pi_append_log::observability::init_observability 初始化 pi_logger 日志 subscriber。
接口契约、设计取舍及默认 V1 格式提案见 追加日志技术设计提案。
0.1 -> 0.2 迁移说明
0.2 是破坏性升级:
- Layout 的 active/closed 命名替换为 segment_name/archive_name;segment 无后缀,最大 ID 为 active,允许缺号,rotate 不重命名旧 segment。
- AppendLog 的 Block 关联类型已移除;append 改用 DetachableWriteBuffer,并新增 append_stream。公共错误改用 pi_result::Result。
- 文件归档仍是在同一 namespace 内执行 rename,不支持跨磁盘 copy。