Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Remove LogEvent SequenceID or change to 64 bit ?

未关闭
#4,159 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
csharp

调研方向

首先阅读 issue #4139,并比较关于 SequenceID 和 Counter 的 layout-renderer wiki 页面。追踪 SequenceID 如何递增和被使用,然后确定已完成的工作是移除它、合并 renderer,还是更改其范围;完成工作需要达成一致的方向以及相应的测试。

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

描述

discussion

Random thoughts after looking at #4139. And the overhead from synchronizing cpu-caches to atomically increment a counter that very few people uses, and unexpectedly can become negative after some days.

Lets say we have an application that handles 10.000 requests/sec. This application writes a single logevent for each request.

This means the application will write 36..000.000 logevents/hour. And 864.000.000 logevents/day.

Right now the SequenceID is an integer and can hold 2,147,483,647 events, before it becomes negative. So that is 3 days without restarts. Many applications often run 7 days without restarts.

Maybe the SequenceID-property should only increment when calling the propery-getter? (Skip on constructor)

Maybe https://github.com/NLog/NLog/wiki/SequenceId-layout-renderer should be replaced by https://github.com/NLog/NLog/wiki/Counter-layout-renderer ? (Merge into one)

主要语言
C#
星标
6.5k
派生
1.4k
平均合并
15 小时 27 分钟
30 天内合并 PR
23

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

NLog/NLog 的其他 Issue

查看 NLog/NLog 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

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