aw-sync: rowid upgrade bootstrap does not recover backfills lost under the old timestamp cursor

未关闭
#793 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust
领域
backend, databases

调研方向

Read the bootstrap and rowid-cursor work in ActivityWatch/aw-server-rust#789, along with the old destination-as-marker behavior in #696. First decide how reconciliation should match events when heartbeat merging is involved; the issue does not name implementation files or tests. Done means an opt-in bootstrap reconcile or aw-sync --reconcile recovers missing source events without duplicating destination events.

由索引模型根据 Issue 内容生成。

描述

Follow-up from ActivityWatch/aw-server-rust#789 (review thread on the upgrade bootstrap).

Gap. On the first pull after upgrading to the rowid cursor (stored_rowid == 0 and the destination already has events), #789 seeds the cursor at the source's current max rowid and runs one last timestamp-cursor pass. A backfilled event (old timestamp, new rowid) that landed in the source before that first rowid pull sits below both boundaries: the max-rowid seed marks it consumed, and the timestamp pass starts after the destination's newest event. It is never copied.

Scope. This is not a regression. The same events were already lost under the old destination-as-marker cursor (#696); #789 stops new losses but does not recover old ones. My earlier description on the review thread ("only if the timestamp pass fails") was too narrow: the miss happens even when that pass succeeds.

Possible fix. A one-time, opt-in reconcile on the bootstrap pass (or an explicit aw-sync --reconcile flag): scan source history, then insert events missing from the destination, matched by (timestamp, duration, data). Heartbeat-merged events complicate the matching, so this needs a design decision before anyone implements it. It is not needed to merge #789.

主要语言
Rust
星标
322
派生
107
平均合并
2 天 16 小时
30 天内合并 PR
25

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ActivityWatch/aw-server-rust 的其他 Issue

查看 ActivityWatch/aw-server-rust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。