archer import replays a sealed archive into an existing table: shard selection (`--select`), SHA-256 pre-verification, idempotent modes (`ignore`/`insert`/`replace`), and both LOAD DATA and batched-INSERT engines. It reads manifest.jsonl strictly so corruption is reported instead of skipped, and supports --dry-run, --allow-partial, and per-shard workers. --bulk-delete no longer rejects --shard-by date. Range deletion now derives its bounds from the chunk's actual keys (date scanners rewrite LastKey into a resumption cursor) and keeps safe-auto-increment semantics by excluding the current max key. A startup warning documents the monotonic-shard-column assumption. Also splits CLI/format/sharding/progress/safety reference docs out of the README, and adds the corresponding OpenSpec change artifacts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.0 KiB
1.0 KiB
安全说明
--purge会删除源表数据。先用--dry-run,再只导出核对,最后才启用。--bulk-delete改为按 chunk 实际读取行的主键区间删除,可能删除扫描期间新插入且满足--where的行; 默认关闭。日期分片模式下也可用,但要求分片列相对扫描键单调、无回填(即日期随主键递增、 没有迟到数据),否则迟到行可能让区间跨日期,把尚未归档的数据提前删掉。--safe-auto-increment默认开启,purge 时不会删除当前最大自增主键行。- 日期路径 B 会长时间持有一个只读查询与连接,可能推迟 undo 清理;用
--max-lag限制主从延迟,优先为分片列建立(shard_column, pk)联合索引走路径 A。 --where原样拼入 SQL,等同于 pt-archiver 的信任模型;不要让不可信输入进入该参数。- 配置指纹包含 DSN 中的
time_zone;时区漂移会导致同一行落到相邻日期,续跑会被拒绝。