Use an internal index to more accurately track renames on macOS
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- java, macos
调研方向
首先追踪 macOS FSEvents 的处理方式,以及当前如何解释 ITEM_RENAMED、ITEM_CREATED 和 ITEM_REMOVED。重现 issue 中描述的三种移动情况,然后将完成标准定义为:能够区分移入监视范围、移出监视范围以及在监视范围内的移动,而不是仅依赖文件系统存在性检查。
由索引模型根据 Issue 内容生成。
描述
When a file is moved and we're using the native FSEvents API on macOS, it issues native events with flag ITEM_RENAMED set, but not flags ITEM_CREATED or ITEM_REMOVED. Typical cases include:
- Moving a file within the watch scope. In this case, there are two native events: one for the source (logically: delete), and one for the destination (logically: create).
- Moving a file into the watch scope. In this case, there is one native event, for the destination (logically: create).
- Moving a file out of the watch scope. In this case, there is one native event, for the source (logically: delete).
Because flags ITEM_CREATED and ITEM_REMOVED aren't set, the native events in cases 2 and 3 are indistinguishable. Currently, this is solved by asking the file system if the file exists: if it does, we assume it's case 2; if it doesn't, we assume it's case 3. However, this can be inaccurate (because things can have happened to the file between the native event was issued and asking the file system). A more accurate approach could be to maintain our own index.
- 主要语言
- Java
- 星标
- 1
- 派生
- 0
- 平均合并
- 14 小时 40 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SWAT-engineering/java-watch 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 28/100
-
`IndexingRescanner` doesn't generate `DELETED` events for content items of moved/renamed directories 未关闭bug
难度 3/5 1-2 天 新手友好度 45/100
-
bug enhancement
难度 5/5 一周以上 新手友好度 25/100
-
good first issue
难度 3/5 1-2 天 新手友好度 42/100
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
查看 SWAT-engineering/java-watch 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
难度 2/5 1-3 小时 新手友好度 78/100
getsentry/sentry-java#6138 · 1 条评论 ·
-
bug needs triage p2
难度 2/5 1-3 小时 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 条评论 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
apache/rocketmq-dashboard#4654 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 76/100