<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Victor's Code Journey</title><link>http://www.victorchu.info/</link><description>Victor's Code Journey</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><managingEditor>victorchu0610@outlook.com (victorchutian)</managingEditor><webMaster>victorchu0610@outlook.com (victorchutian)</webMaster><lastBuildDate>Thu, 02 Jul 2026 21:39:38 +0800</lastBuildDate><atom:link href="http://www.victorchu.info/index.xml" rel="self" type="application/rss+xml"/><item><title>Presto/Trino 中 0.5 引发的精度谜团：Decimal 隐式类型推导与 MySQL 差异</title><link>http://www.victorchu.info/posts/2026/07/098549ec/</link><pubDate>Thu, 02 Jul 2026 21:39:38 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/07/098549ec/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/trino.webp" referrerpolicy="no-referrer">
            </div><p>在 Presto/Trino 中，<code>0.5</code> 默认不是 <code>DOUBLE</code>，而是 <code>DECIMAL</code>。这个容易被忽略的字面量类型，会让 <code>bigint * 0.5</code> 这类表达式整体走上 Decimal 算术规则，最终把结果 scale 锁死在 1 位小数。</p>
<p>本文从一个线上&quot;精度丢失&quot;问题切入，逐步拆解 Presto 的类型推导链与 Decimal 四则运算规则，再对比 MySQL 在加减乘除上的差异，最后给出可复用的排查建议。如果你曾在跨引擎或跨团队迁移时被精度问题困扰，这篇文章应该能帮到你。</p>]]></description></item><item><title>限流简介</title><link>http://www.victorchu.info/posts/2026/06/8ce642df/</link><pubDate>Tue, 30 Jun 2026 14:15:08 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/06/8ce642df/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/distribute.webp" referrerpolicy="no-referrer">
            </div><p>限流是高并发系统里最朴素的自我保护手段：当流量超过系统承载上限时，主动拒绝或排队部分请求，换取整体稳定。</p>
<p>这篇文章从固定窗口、滑动窗口、漏桶、令牌桶、GCRA 五类经典算法讲起，用 Redis Lua 脚本还原实现细节，再分析 Redisson RateLimiter 的设计本质，最后落到分布式限流的三大关键问题与生产选型建议。如果你正在设计或优化一套限流方案，这篇文章会是一张清晰的路线图。</p>]]></description></item><item><title>MacBook Pro 2016 15 Inch安装 Ubuntu 系统</title><link>http://www.victorchu.info/posts/2026/06/6ea75aca/</link><pubDate>Tue, 30 Jun 2026 11:20:13 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/06/6ea75aca/</guid><description></description></item><item><title>60 秒定位 Linux 性能瓶颈：一份能直接抄的命令清单</title><link>http://www.victorchu.info/posts/2026/06/73913c08/</link><pubDate>Wed, 03 Jun 2026 21:09:18 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/06/73913c08/</guid><description><![CDATA[<p>凌晨 3 点，oncall 电话响了。&ldquo;服务慢了，用户在刷不出页面。&rdquo; 你 SSH 进一台从没见过的 Linux 服务器，没有 Prometheus dashboard，没有 APM 火焰图，只有黑漆漆的命令行。</p>
<p>第一分钟该敲什么？</p>
<p>Netflix 性能工程团队 2015 年给出的答案是：<strong>10 个命令，60 秒</strong>。本文把这套方法整理成一份可以照抄的清单，并补上一张&quot;心智地图&quot;，让你不只是机械记忆命令，而是理解<strong>为什么要敲它们、应该看哪几列、看完之后该往哪走</strong>。</p>]]></description></item><item><title>eBPF 简介：从钩子、验证器到 BCC 实战</title><link>http://www.victorchu.info/posts/2026/06/0bff2f37/</link><pubDate>Wed, 03 Jun 2026 20:50:00 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/06/0bff2f37/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/computer.webp" referrerpolicy="no-referrer">
            </div><p>你有没有遇到过这种场景：线上服务偶发延迟，<code>top</code> 看 CPU 正常、<code>iostat</code> 看磁盘不忙、<code>strace</code> 抓不到关键调用，但应用就是慢。想看某个系统调用真实的耗时分布？想找&quot;一闪而过&quot;的短进程？传统工具集体失灵。</p>
<p>问题的根源在于：<strong>Linux 内核对你&quot;关着门&quot;</strong>。你想观测的所有关键路径——系统调用、网络收发、调度、文件 I/O——都在内核里，而你已经很多年没编译过内核了。</p>
<p><code>eBPF</code>（extended Berkeley Packet Filter）就是 Linux 给开发者开的一扇窗。它让你<strong>不重启内核、不写内核模块</strong>，就能在内核的关键路径上跑一段自定义逻辑。本文用三件事讲清它：eBPF 是什么、怎么工作、怎么先用起来。</p>]]></description></item><item><title>GraphRAG 简介</title><link>http://www.victorchu.info/posts/2026/06/b0e01596/</link><pubDate>Mon, 01 Jun 2026 17:06:42 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/06/b0e01596/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/ai.webp" referrerpolicy="no-referrer">
            </div><p>你有没有遇到过这种情况：公司丢给你 10 万份内部事件报告，问你 <strong>&ldquo;过去三年里，攻击模式呈现出哪些新趋势？&rdquo;</strong> 你把这堆文档丢给传统 RAG 系统，它会按相似度捞出 Top-K 个最相关的文档块，让大模型基于这些片段作答。听起来很合理对吧？</p>
<p>问题来了：大模型拿到的只是 10 万份报告里&quot;和&rsquo;攻击趋势&rsquo;长得最像&quot;的几十个片段。它 <strong>根本没有通读过完整语料</strong> ，怎么回答得出&quot;新趋势&quot;这种 <strong>全局性问题（Global Sensemaking）</strong> ？向量检索的本质是&quot;局部相似&quot;，而全局总结是&quot;通盘理解&quot;，这是两件本质不同的事。</p>
<p>类似的全局性问题还有很多：</p>
<ul>
<li>&ldquo;这家企业涉及的核心人物和主要事件有哪些？&rdquo;</li>
<li>&ldquo;这部小说里的人物关系网络是什么样子？&rdquo;</li>
<li>&ldquo;这套开源代码的架构主题分布如何？&rdquo;</li>
</ul>
<p><strong>GraphRAG</strong>（Graph-based RAG）就是为这类问题而生的。它把 RAG 的检索单元从&quot;文本片段&quot;升级为 &ldquo;<strong>知识图谱</strong>&rdquo; ，通过图社区摘要、Map-Reduce 等机制让 LLM 真正具备 <strong>全局感知能力</strong> 。</p>]]></description></item><item><title>Rsync 算法简介</title><link>http://www.victorchu.info/posts/2026/05/26560a6b/</link><pubDate>Wed, 20 May 2026 14:33:42 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/05/26560a6b/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/algorithm.webp" referrerpolicy="no-referrer">
            </div><p>你有没有遇到过这种情况：服务器上有两份代码，版本 A 和版本 B，你只想把 A 的改动同步到 B，但网络带宽只有几 Mbps，传输一个 24MB 的文件要等上好几分钟。</p>
<p>也许你会想到先在本地 diff，然后把 patch 发过去。没错，这是个思路。但你有没有想过：<strong>如果 A 和 B 都不在同一台机器上，diff 根本跑不起来怎么办？</strong></p>
<p>这就是 rsync 要解决的问题。</p>]]></description></item><item><title>聊聊5种正则表达式引擎的实现原理</title><link>http://www.victorchu.info/posts/2026/05/25d3ebb8/</link><pubDate>Fri, 15 May 2026 16:50:40 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/05/25d3ebb8/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/regex.webp" referrerpolicy="no-referrer">
            </div><p>正则表达式看似简单，底层却藏着五花八门的实现思路。本文将带你了解递归引擎、BBVM 虚拟机、Pike VM、Thompson DFA 和导数引擎的工作原理，帮助你在实际项目中做出明智的技术选型。</p>]]></description></item><item><title>Self-Host 服务暴露公网：我用三招守住安全底线</title><link>http://www.victorchu.info/posts/2026/04/2026-04-30-%E4%BF%9D%E6%8A%A4%E8%87%AA%E5%B7%B1%E7%9A%84selfhost-%E6%9C%8D%E5%8A%A1/</link><pubDate>Thu, 30 Apr 2026 16:53:58 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/04/2026-04-30-%E4%BF%9D%E6%8A%A4%E8%87%AA%E5%B7%B1%E7%9A%84selfhost-%E6%9C%8D%E5%8A%A1/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/selfhosted.webp" referrerpolicy="no-referrer">
            </div><p>搬家后，Self-Host 服务无法通过公网 IPv4 访问，只能用 IPv6 + DDNS 方案。但家里路由器不支持精细的 IPv6 访问管理，开着防火墙会影响服务，关闭防火墙又等于裸奔。</p>
<p>最终通过三招解决了问题：反向代理隔离、登录增强、FRP 流量转发。</p>]]></description></item><item><title>Docker 容器访问 IPv6 地址：踩坑与解决方案</title><link>http://www.victorchu.info/posts/2026/04/2026-04-28-docker-%E5%AE%B9%E5%99%A8%E8%AE%BF%E9%97%AEipv6%E5%9C%B0%E5%9D%80/</link><pubDate>Tue, 28 Apr 2026 14:26:43 +0800</pubDate><author><name>victorchutian</name></author><guid>http://www.victorchu.info/posts/2026/04/2026-04-28-docker-%E5%AE%B9%E5%99%A8%E8%AE%BF%E9%97%AEipv6%E5%9C%B0%E5%9D%80/</guid><description><![CDATA[<div class="featured-image">
                <img src="/feature-images/docker.webp" referrerpolicy="no-referrer">
            </div><p>最近搬家，家里的 Self-Host 服务由于限制无法通过公网 IPv4 访问，就改用 IPv6 + DDNS 的方式提供公网域名访问。</p>
<p>切换完成后，立即收到云服务器上 Uptime Kuma 的告警，显示无法连接 IPv6 地址。排查发现 Docker 容器默认不支持 IPv6。</p>]]></description></item></channel></rss>