repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
Snailclimb/JavaGuide
2,850
issue_to_patch
docs: fix method reference formatting
## 修改 - 移除了方法引用中的多余空格
37057a0c7230ca7ba02c01a70ba78ff4f277ff66
00b94739b6a62201c66601f829fc837a8aafae39
diff --git a/docs/system-design/framework/spring/Async.md b/docs/system-design/framework/spring/Async.md index 79a78bbf8d9..f36a0925ce2 100644 --- a/docs/system-design/framework/spring/Async.md +++ b/docs/system-design/framework/spring/Async.md @@ -441,7 +441,7 @@ Callable<Object> task = () -> { #### 3、提交异步任务 -在 `...
[ "docs/system-design/framework/spring/Async.md", "docs/system-design/framework/spring/async.md" ]
[]
true
Snailclimb/JavaGuide
2,848
issue_to_patch
fix: 修正优先级队列描述,区分消息优先级与队列优先级 (issue #2847)
## 修复内容 修正 RabbitMQ 优先级队列章节的描述错误: **修改前:** > 优先级高的**队列**会先被消费。 **修改后:** > 优先级高的**消息**会先被消费,而非队列本身有优先级区分。优先级队列是指同一个队列内部的消息按优先级排序,优先级高的消息会被优先投递给消费者。 **Issue:** #2847
a7395d1bc2f8d9b2a52430e499c88120e5e77359
3c105a38c30589fb0f024d64299cc3708aaa001a
diff --git a/docs/high-performance/message-queue/rabbitmq-questions.md b/docs/high-performance/message-queue/rabbitmq-questions.md index 343e69e17b4..bffd8356140 100644 --- a/docs/high-performance/message-queue/rabbitmq-questions.md +++ b/docs/high-performance/message-queue/rabbitmq-questions.md @@ -214,7 +214,7 @@ Rab...
[ "docs/high-performance/message-queue/rabbitmq-questions.md" ]
[]
true
Snailclimb/JavaGuide
2,846
issue_to_patch
更新了可重入锁的举例
原文“JDK 提供的所有现成的 Lock 实现类,包括 synchronized 关键字锁都是可重入的。”不严谨,JDK 中 synchronized、ReentrantLock、ReentrantReadWriteLock 是可重入的;但不能说 JDK 提供的所有锁都是可重入的,StampedLock 就不是。
01ab2d839129ad67aa5a89fb623055a10c7dad42
f4e0c04b2e699283645f8ee8f05dc0700a33c251
diff --git a/docs/java/concurrent/java-concurrent-questions-02.md b/docs/java/concurrent/java-concurrent-questions-02.md index 78c82fc9140..c39df7542a3 100644 --- a/docs/java/concurrent/java-concurrent-questions-02.md +++ b/docs/java/concurrent/java-concurrent-questions-02.md @@ -779,7 +779,7 @@ public ReentrantLock(bo...
[ "docs/java/concurrent/java-concurrent-questions-02.md" ]
[]
true
Snailclimb/JavaGuide
2,842
issue_to_patch
Update advantages of AOT and JIT in documentation
Clarified the advantages of AOT and JIT compilation, emphasizing startup time, memory usage, and packaging size.
39a3022101096cdfdc23c49a5e2b704a684a931e
6ce1205c7b86af57bbef2433f0063f9284eb27f6
diff --git a/docs/java/basis/java-basic-questions-01.md b/docs/java/basis/java-basic-questions-01.md index a80ae30dbb3..98bd7d9d20e 100644 --- a/docs/java/basis/java-basic-questions-01.md +++ b/docs/java/basis/java-basic-questions-01.md @@ -151,7 +151,7 @@ JDK 9 引入了一种新的编译模式 **AOT(Ahead of Time Compilation)** 。 <img ...
[ "docs/java/basis/java-basic-questions-01.md" ]
[]
true
Snailclimb/JavaGuide
2,843
issue_to_patch
优化 StringBuffer 与 StringBuilder 性能说明,避免歧义
原文在性能部分先说明了 StringBuffer 是在原对象上进行修改(不创建新对象), 随后紧接着对比了 StringBuilder 与 StringBuffer 的性能差异。这种表述可能会让读者将“是否创建新对象”与“性能差异”产生关联 但实际上,StringBuffer 和 StringBuilder 都是在原对象上修改,两者的性能差异主要来源于线程安全机制
39a3022101096cdfdc23c49a5e2b704a684a931e
04d9fbe3ca3f04262c30a04440b52f73587f5621
diff --git a/docs/java/basis/java-basic-questions-02.md b/docs/java/basis/java-basic-questions-02.md index 2aa14b0946a..cb95be7eb1e 100644 --- a/docs/java/basis/java-basic-questions-02.md +++ b/docs/java/basis/java-basic-questions-02.md @@ -603,7 +603,8 @@ public native int hashCode(); **可变性** -`String` 是不可变的(后面会详...
[ "docs/java/basis/java-basic-questions-02.md" ]
[]
true
Snailclimb/JavaGuide
2,835
issue_to_patch
build(deps): bump @xmldom/xmldom from 0.9.9 to 0.9.10
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.9.9 to 0.9.10. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/xmldom/xmldom/releases"><code>@​xmldom/xmldom</code>'s releases</a>.</em></p> <blockquote> <h2>0.9.10</h2> <p><a href="https://github.com/xmldom/xmldo...
8b9d7da1c8756b58905b1ae419d935270ccd48f2
b9d5d7e3beddad942b87fa30c2ad8e7b531da3f6
diff --git a/package.json b/package.json index eca90209f67..4ab7680aa94 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "rollup": ">=4.59.0", "dompurify": ">=3.3.2", "lodash-es": ">=4.18.0", - "@xmldom/xmldom": ">=0.9.9", + "@xmldom/xmldom": ">=0.9.10", "picomatch": ...
[ "package.json", "pnpm-lock.yaml" ]
[]
true
Snailclimb/JavaGuide
2,838
issue_to_patch
docs: clarify connector permission check in MySQL execution flow (fix #2466)
## 修复内容 修复 Issue #2466:SQL执行流程中关于连接器权限校验步骤的描述不准确 **问题**:原描述「先检查该语句是否有权限」不够准确,容易让读者误以为权限检查发生在分析器/缓存之后。 **修复**:明确指出连接器在身份认证阶段即完成权限获取,认证失败则直接拒绝访问。 ```diff - 先检查该语句是否有权限,如果没有权限,直接返回错误信息,如果有权限,在 MySQL8.0 版本以前... + 先通过连接器进行身份认证和权限获取(若认证失败则直接拒绝),在 MySQL8.0 版本以前,认证通过后会先查询缓存... ``` 参考:MySQL连接器主要负责用户登录时的身份认证,包括校验账户密码和权限获取(I...
f30f7d5334e54edc617ab806b74a7170ae00fe1e
d64903a40dd6f9dde3e2c831fea858751ed553c8
diff --git a/docs/database/mysql/how-sql-executed-in-mysql.md b/docs/database/mysql/how-sql-executed-in-mysql.md index 45a1d8d79ef..1d2baff9f9d 100644 --- a/docs/database/mysql/how-sql-executed-in-mysql.md +++ b/docs/database/mysql/how-sql-executed-in-mysql.md @@ -89,7 +89,7 @@ select * from tb_student A where A.age='...
[ "docs/database/mysql/how-sql-executed-in-mysql.md", "docs/java/concurrent/aqs.md" ]
[]
true
Snailclimb/JavaGuide
2,841
issue_to_patch
docs(mysql): clarify boolean type mapping
## Summary - clarify that MySQL `BOOL` and `BOOLEAN` are aliases for `TINYINT(1)` - distinguish that mapping from the separate `BIT(1)` bit-field type ## Tests - Not run; documentation-only correction.
0fc3530594cd482499060cd3b2870941ae6d4a2b
acf14267a521293c15e8cf3a048725ff43eca488
diff --git a/docs/database/mysql/mysql-questions-01.md b/docs/database/mysql/mysql-questions-01.md index b89811c3b06..525132206c9 100644 --- a/docs/database/mysql/mysql-questions-01.md +++ b/docs/database/mysql/mysql-questions-01.md @@ -197,7 +197,7 @@ TIMESTAMP 只需要使用 4 个字节的存储空间,但是 DATETIME 需要耗 ### ⭐️Boolean 类型如何表示?...
[ "docs/database/mysql/mysql-questions-01.md" ]
[]
true
Snailclimb/JavaGuide
2,837
issue_to_patch
fix: 修正关于CountDownLatch使用场景的描述
CountDownLatch 允许 count 个线程阻塞在一个地方,直至所有线程的任务都执行完毕。 改为 CountDownLatch 允许 任意数量 个线程阻塞在一个地方,直至count个线程的任务都执行完毕(count次countDown调用)。
f30f7d5334e54edc617ab806b74a7170ae00fe1e
288034a40e86c43d17759930d985eca9ace63f76
diff --git a/docs/java/concurrent/java-concurrent-questions-03.md b/docs/java/concurrent/java-concurrent-questions-03.md index ef3b3269bcd..debdc726a1f 100644 --- a/docs/java/concurrent/java-concurrent-questions-03.md +++ b/docs/java/concurrent/java-concurrent-questions-03.md @@ -1355,7 +1355,7 @@ public final boolean ...
[ "docs/java/concurrent/java-concurrent-questions-03.md" ]
[]
true
Snailclimb/JavaGuide
2,839
issue_to_patch
补充 OpenAI 官方工具
OpenAI 官方提供的网页端可视化 Tokenizer 工具
f30f7d5334e54edc617ab806b74a7170ae00fe1e
331bde2b20c54ea3098da66f5ee37212cea57961
diff --git a/docs/ai/llm-basis/llm-operation-mechanism.md b/docs/ai/llm-basis/llm-operation-mechanism.md index ec19132ad11..f065ce76de2 100644 --- a/docs/ai/llm-basis/llm-operation-mechanism.md +++ b/docs/ai/llm-basis/llm-operation-mechanism.md @@ -104,6 +104,8 @@ Token 划分的精细度会直接影响模型的理解能力。特别是在中 ![Token 化过程示例](https://...
[ "docs/ai/llm-basis/llm-operation-mechanism.md" ]
[]
true
Snailclimb/JavaGuide
2,830
issue_to_patch
Update mysql-questions-01.md
布尔类型使用bit更合理,类型介绍里增加了bit类型和binary类型
dfda90c35860c5fa4cc40387398a37fabcc507b7
0cc9a2a97a90e58b589b41eb4c9accf93c71f83c
diff --git a/docs/database/mysql/mysql-questions-01.md b/docs/database/mysql/mysql-questions-01.md index d02d378a409..b89811c3b06 100644 --- a/docs/database/mysql/mysql-questions-01.md +++ b/docs/database/mysql/mysql-questions-01.md @@ -82,8 +82,8 @@ MySQL 成功可以归功于在**生态、功能和运维**这三个层面上的 MySQL 字段类型可以简单分为三大类: -- **数值类型...
[ "docs/database/mysql/mysql-questions-01.md" ]
[]
true
Snailclimb/JavaGuide
2,829
issue_to_patch
fix: correct volatile description for AQS state variable
## 修复 AQS 中 `state` 变量的 `volatile` 作用描述不准确问题 ### 问题描述 关闭 #2516 原文中代码注释为: ```java // 共享变量,使用volatile修饰保证线程可见性 private volatile int state; ``` 以及描述文字仅提到 `volatile` 用于"展示当前临界资源的获取情况"。 ### 问题分析 `volatile` 在 AQS `state` 变量中的作用**不仅仅是保证可见性**。实际上,在 AQS 实现中更关键的是通过 **happens-before 规则**来防止指令重排序: > JMM 的 happens-before 规则...
226f96853e5bbf5d2bf268393c25e72196c94c23
87d61b59523f5106daba1098a1c6644c058ef9b3
diff --git a/docs/java/concurrent/aqs.md b/docs/java/concurrent/aqs.md index 8f45336ebbc..19c8744c7f0 100644 --- a/docs/java/concurrent/aqs.md +++ b/docs/java/concurrent/aqs.md @@ -106,10 +106,10 @@ AQS(`AbstractQueuedSynchronizer`)的核心原理图: AQS 使用 **int 成员变量 `state` 表示同步状态**,通过内置的 **FIFO 线程等待/等待队列** 来完成获取资源线程的排队工作。 ...
[ "docs/java/concurrent/aqs.md" ]
[]
true
Snailclimb/JavaGuide
2,828
issue_to_patch
Update jvm-garbage-collection.md
先讲堆的 GC,再讲堆中字符串常量池的 GC,最后讲方法区的 GC。 因此这里应该是字符串常量池,运行时常量池应该在下面的方法区。
226f96853e5bbf5d2bf268393c25e72196c94c23
7d9bd4faf24f774f632398575d080faa1b7f88b0
diff --git a/docs/java/jvm/jvm-garbage-collection.md b/docs/java/jvm/jvm-garbage-collection.md index 5840547d50f..b1f5ceaa49b 100644 --- a/docs/java/jvm/jvm-garbage-collection.md +++ b/docs/java/jvm/jvm-garbage-collection.md @@ -333,7 +333,7 @@ PhantomReference phantomReference2 = new PhantomReference(new String("abc")...
[ "docs/java/jvm/jvm-garbage-collection.md" ]
[]
true
Snailclimb/JavaGuide
2,824
issue_to_patch
改正了类型擦除的英文表述
将泛型语法糖中“类型擦除”的英文表述从“type erasue”更正为“type erasure”
3d22d02b83c6787b83cc803ccdbf9489316621ce
1c5e23b602d82bd8f531b2eec6d3eda58c3c7f3c
diff --git a/docs/java/basis/syntactic-sugar.md b/docs/java/basis/syntactic-sugar.md index e0b15493d2b..3bd74b9fb0e 100644 --- a/docs/java/basis/syntactic-sugar.md +++ b/docs/java/basis/syntactic-sugar.md @@ -101,7 +101,7 @@ public class switchDemoString 我们都知道,很多语言都是支持泛型的,但是很多人不知道的是,不同的编译器对于泛型的处理方式是不同的,通常情况下,一个编译器处理...
[ "docs/java/basis/syntactic-sugar.md" ]
[]
true
Snailclimb/JavaGuide
2,826
issue_to_patch
补充workflow方面的知识
添加workflow-graph-loop.md文档
bc97054af625e5a3ef5d2169ae2a01ec7752d686
d901c756973f4a9b05fb85293cc1fa4f80961892
diff --git a/docs/ai/agent/workflow-graph-loop.md b/docs/ai/agent/workflow-graph-loop.md new file mode 100644 index 00000000000..edf59b1bb3a --- /dev/null +++ b/docs/ai/agent/workflow-graph-loop.md @@ -0,0 +1,200 @@ +# AI 工作流中的 Workflow、Graph 与 Loop:从概念到实现 + +## 一、为什么 AI 系统会需要工作流 + +单轮对话虽然可以回答问题,但很难稳定地**交付结果**。在真实场景中,一...
[ "docs/ai/agent/workflow-graph-loop.md" ]
[]
true
Snailclimb/JavaGuide
2,820
issue_to_patch
Java 语法糖详解中的可能遇到的坑部分的增强for循环的问题 `Iterator` 并不是工作在独立线程中,也没有所谓的 `mutex` 锁。它本质上只是一个用于遍历集合的对象。很多集合类在创建迭代器后,会用一个计数器记录集合结构是否发生变化。迭代过程中,迭代器会检查这个计数器:如果发现集合在遍历期间被其他方式修改了,就会认为当前迭代结果不再可靠,于是抛出异常。
fix: 修正增强 for 循环中 Iterator fail-fast 机制的描述
## Summary - 修正增强 for 循环坑点中关于 `ConcurrentModificationException` 原因的错误描述 - 原文错误地声称 Iterator 工作在独立线程中并持有 mutex 锁,实际机制是通过 `modCount` / `expectedModCount` 计数器比较实现 fail-fast - 同时修正 `Iterator.remove()` 的说明:原文说"维护索引的一致性",实际是同步更新 `expectedModCount` Closes #2818 ## Test plan - [ ] 确认修改后的描述与 JDK 源码(如 `ArrayList.Itr`)中 fail-f...
6a2ce6ed3e7ca92cea76c5394d21dfb08ecd80f3
2839f2b27ba19c95e370f3b00515e2f2292acbba
diff --git a/docs/java/basis/syntactic-sugar.md b/docs/java/basis/syntactic-sugar.md index 615b008e43e..e0b15493d2b 100644 --- a/docs/java/basis/syntactic-sugar.md +++ b/docs/java/basis/syntactic-sugar.md @@ -861,9 +861,9 @@ for (Student stu : students) { 会抛出`ConcurrentModificationException`异常。 -Iterator 是工作在一个独立的...
[ "docs/java/basis/syntactic-sugar.md" ]
[]
true
Snailclimb/JavaGuide
2,819
issue_to_patch
docs(sidebar): reorder data-structure entries in VuePress sidebar
# 解决的问题 在当前的侧边栏,树排在图的后面: <img width="333" height="227" alt="图片" src="https://github.com/user-attachments/assets/ac9f37bc-ce2f-45cb-a33d-11be5afcdef7" /> 但是图这一章节的内容明显是对章节顺序有要求的: <img width="887" height="117" alt="图片" src="https://github.com/user-attachments/assets/a7fe9e5a-46d8-41df-9919-7219c25f391f" /> ...
b459f6d675830ac6feafc47e90de2617281fbbc8
c66d659a8574b82656d218288ac16e91a768e574
diff --git a/docs/.vuepress/sidebar/index.ts b/docs/.vuepress/sidebar/index.ts index 60389a5212b..baf6458a152 100644 --- a/docs/.vuepress/sidebar/index.ts +++ b/docs/.vuepress/sidebar/index.ts @@ -222,9 +222,9 @@ export default sidebar({ collapsible: true, children: [ "linear-data-str...
[ "docs/.vuepress/sidebar/index.ts" ]
[]
true
Snailclimb/JavaGuide
2,817
issue_to_patch
fix: clarify parent delegation core-class example
Clarify the class loader example in the parent delegation section. The previous wording implied `java.lang.Object` is loaded through the normal delegation path all the way to a bootstrap lookup. This update makes the security boundary explicit: core classes are prioritized by BootstrapClassLoader, but `ClassLoader#pre...
e2d92c3a81aa16610dab5315259ccd24fc9eb11e
fa84d917aa5c9bc53c044375c8d3ed831230a0ef
diff --git a/docs/java/jvm/classloader.md b/docs/java/jvm/classloader.md index 9ef726ddc51..8e034414485 100644 --- a/docs/java/jvm/classloader.md +++ b/docs/java/jvm/classloader.md @@ -290,7 +290,7 @@ protected Class<?> loadClass(String name, boolean resolve) JVM 区分不同类的依据是类名加上加载该类的类加载器,即使类名相同,如果由不同的类加载器加载,也会被视为不同的类。...
[ "docs/java/jvm/classloader.md" ]
[]
true
Snailclimb/JavaGuide
2,813
issue_to_patch
关于线程池那核心参数与线程处理任务的流程中对于线程状态的理解感觉有歧义 我感觉这里把线程的运行,空闲,存活搞混了。 我问ai严谨点对于线程处理任务流程应该是: 全程判断依据:线程池中「已创建且未销毁的工作线程总数」(与线程当前是执行任务 / 空闲等待无关) 提交新任务至线程池; 若当前工作线程总数 < corePoolSize: 直接创建新的核心工作线程执行该任务; 若当前工作线程总数 ≥ corePoolSize: 尝试将任务添加至 workQueue 阻塞队列; 入队成功:任务排队,等待空闲工作线程执行; 入队失败(队列已满):执行下一步; 队列已满,且当前工作线程总数 < maximumPoolSize: 创建新的非核心工作...
docs: clarify thread pool worker count wording
## Summary - clarify that the `execute()` decision flow is based on the total number of live worker threads, not only the threads currently running tasks - update the simplified `ThreadPoolExecutor` flow explanation to avoid mixing running, idle, and alive worker states - align the thread pool best-practices wording wi...
eaaa61dc0f3639811d847dba7c5963cfe052b35f
6110a498889b9de08a1e55078dda35df284d5278
diff --git a/docs/java/concurrent/java-thread-pool-best-practices.md b/docs/java/concurrent/java-thread-pool-best-practices.md index 7bbc5592871..f6ca29e0d9b 100644 --- a/docs/java/concurrent/java-thread-pool-best-practices.md +++ b/docs/java/concurrent/java-thread-pool-best-practices.md @@ -182,7 +182,7 @@ IO 密集型任务下,几...
[ "docs/java/concurrent/java-thread-pool-best-practices.md", "docs/java/concurrent/java-thread-pool-summary.md" ]
[]
true
Snailclimb/JavaGuide
2,816
issue_to_patch
reids持久化机制解释 [AOF 持久化方式有哪些?](https://javaguide.cn/database/redis/redis-persistence.html#aof-%E6%8C%81%E4%B9%85%E5%8C%96%E6%96%B9%E5%BC%8F%E6%9C%89%E5%93%AA%E4%BA%9B) 这里提到的 ``` appendfsync always:主线程调用 write 执行写操作后,后台线程( aof_fsync 线程)立即会调用 fsync 函数同步 AOF 文件(刷盘),fsync 完成后线程返回,这样会严重降低 Redis 的性能(write + fsync) ``` 实际上可能是主...
docs: correct appendfsync always description - main thread fsync, not background thread
## Summary Fix incorrect documentation about `appendfsync always` in Redis docs. The original text incorrectly stated that `always` uses a background thread (`aof_fsync`) to call `fsync`, when in fact `always` runs `fsync` on the **main thread** (blocking it until the flush completes). ## Changes ### Root Cause Redi...
eaaa61dc0f3639811d847dba7c5963cfe052b35f
646757ada0408a00124849839e5063043fb42e7b
diff --git a/docs/database/redis/redis-common-blocking-problems-summary.md b/docs/database/redis/redis-common-blocking-problems-summary.md index 95041edee60..e57fcd17d40 100644 --- a/docs/database/redis/redis-common-blocking-problems-summary.md +++ b/docs/database/redis/redis-common-blocking-problems-summary.md @@ -68,...
[ "docs/database/redis/redis-common-blocking-problems-summary.md", "docs/database/redis/redis-persistence.md", "docs/database/redis/redis-questions-02.md" ]
[]
true
Snailclimb/JavaGuide
2,810
issue_to_patch
fix: remove duplicate content in agent-basis.md (fix #2808)
## Bug Description Issue: #2808 The `agent-basis.md` article contains an accidental duplicate of the entire "AI Agent 六代进化史" section right after the "Agentic Workflows" section summary paragraph. This causes the article to repeat content. ## Fix Removed 14 duplicate lines (lines 499-512 in the original) that repeat...
721a06f85ea1db51e96333319f420d929bf86483
9fe4f7ce7da4d36ccfe4d67f4e83924ba958e5dd
diff --git a/docs/ai/agent/agent-basis.md b/docs/ai/agent/agent-basis.md index 5948bc962b1..b240b321bc1 100644 --- a/docs/ai/agent/agent-basis.md +++ b/docs/ai/agent/agent-basis.md @@ -496,20 +496,6 @@ Multi-Agent 系统是指多个独立 Agent 通过协作完成单一复杂任务 **通俗理解:** Agentic Workflows 告诉我们,构建强大的 AI 应用,并不是必须要等 GPT-5 或更底层的参数突破,而是用后端工...
[ "docs/ai/agent/agent-basis.md" ]
[]
true
Snailclimb/JavaGuide
2,807
issue_to_patch
fix: 修正Spring注解文章标题并添加注解分类总结表 (fix #2656)
## 修复 Issue #2656 ### 修改内容 **1. 修正文章标题** 将标题从 `Spring&SpringBoot常用注解总结` 改为 `Spring&SpringMVC&SpringBoot常用注解总结`。 **2. 添加注解分类总结表** 在文末添加注解分类总结表格。 --- *由 OpenClaw 开源贡献助手自动提交*
a0ac4de4747d469302fb4e3c8c1e1538049eab4e
3a44d67efea856c59e661b1bff2409a86680caad
diff --git a/docs/system-design/framework/spring/spring-common-annotations.md b/docs/system-design/framework/spring/spring-common-annotations.md index 3a2b006c8ea..5135603b5de 100644 --- a/docs/system-design/framework/spring/spring-common-annotations.md +++ b/docs/system-design/framework/spring/spring-common-annotation...
[ "docs/system-design/framework/spring/spring-common-annotations.md" ]
[]
true
Snailclimb/JavaGuide
2,803
issue_to_patch
Update java8-tutorial-translate.md
The original stream().sorted().count() does not perform sorting and just counts elements directly — it’s equivalent to stream().count(). This makes parallelStream().sorted().count() appear slower by comparison.
0126e0380bb82644ce6c5d0d905d07efce32af40
456f536273a70d1edbe44e2dcc998a5ed0963949
diff --git a/docs/java/new-features/java8-tutorial-translate.md b/docs/java/new-features/java8-tutorial-translate.md index 311825508b1..44833fd75b1 100644 --- a/docs/java/new-features/java8-tutorial-translate.md +++ b/docs/java/new-features/java8-tutorial-translate.md @@ -592,7 +592,7 @@ for (int i = 0; i < max; i++) {...
[ "docs/java/new-features/java8-tutorial-translate.md" ]
[]
true
Snailclimb/JavaGuide
2,806
issue_to_patch
Update comments on static variable storage in Java
0126e0380bb82644ce6c5d0d905d07efce32af40
512f335c5c66aa5079f817bfbaab673849e06a61
diff --git a/docs/java/basis/java-basic-questions-01.md b/docs/java/basis/java-basic-questions-01.md index e94ed828592..a80ae30dbb3 100644 --- a/docs/java/basis/java-basic-questions-01.md +++ b/docs/java/basis/java-basic-questions-01.md @@ -636,7 +636,7 @@ flowchart TB public class Test { // 成员变量,存放在堆中 int a...
[ "docs/java/basis/java-basic-questions-01.md" ]
[]
true
Snailclimb/JavaGuide
2,802
issue_to_patch
build(deps): bump undici from 7.18.2 to 7.24.6
Bumps [undici](https://github.com/nodejs/undici) from 7.18.2 to 7.24.6. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/nodejs/undici/releases">undici's releases</a>.</em></p> <blockquote> <h2>v7.24.6</h2> <h2>What's Changed</h2> <ul> <li>fix(test): client wasm compatible with...
2568cf81a4eaf84f101185f0d488ac8ab5823c21
684ee3f75aa2171d3ace7058af113d601d34ec2c
diff --git a/package.json b/package.json index 7cf66030ef2..8652ecc2022 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "pnpm": { "overrides": { "vite": ">=7.0.8", - "undici": ">=7.18.2", + "undici": ">=7.24.6", "mdast-util-to-hast": ">=13.2.1", "markdownlint-cli2>js-...
[ "package.json", "pnpm-lock.yaml" ]
[]
true
Snailclimb/JavaGuide
2,801
issue_to_patch
fix: Issue#2650 - 修复CAS示例代码的并发打印问题和livelock
## 修复 Issue #2650 ### 问题 现有代码使用 `Thread.yield()` 且 `currentValue == targetValue - 1` 条件存在 livelock 风险:当线程读取值后被其他线程抢先更新,当前线程的 CAS 会永远失败。 ### 解决方案 1. 将跳过条件改为 `currentValue >= targetValue`,避免 livelock 2. 将 `System.out.print` 移入 CAS 成功块内,确保打印值与设置值一致 3. 移除 `Thread.yield()` 避免不必要的 CPU 让出 ### 参考 - Issue: #2650
a744f6a98a65dfb08d4556b851f6d1ad293aef10
2a19e80925f5991d9950c3e370e3de06cde34332
diff --git a/docs/java/basis/unsafe.md b/docs/java/basis/unsafe.md index cc624113852..9acffc941cd 100644 --- a/docs/java/basis/unsafe.md +++ b/docs/java/basis/unsafe.md @@ -559,80 +559,31 @@ private void increment(int x){ 如果你把上面这段代码贴到 IDE 中运行,会发现并不能得到目标输出结果。有朋友已经在 Github 上指出了这个问题:[issue#2650](https://github.com/Snailc...
[ "docs/java/basis/unsafe.md" ]
[]
true
Snailclimb/JavaGuide
2,800
issue_to_patch
fix: pin 1 unpinned action(s)
## Fix: CI/CD Security Vulnerabilities in GitHub Actions Hi! [Runner Guard](https://github.com/Vigilant-LLC/runner-guard), an open-source CI/CD security scanner by [Vigilant Cyber Security](https://www.vigilantdefense.com), identified security vulnerabilities in this repository's GitHub Actions workflows. This PR app...
a744f6a98a65dfb08d4556b851f6d1ad293aef10
80566c5fb36c5b59f1b4ffefe3acc6dcddf8320e
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b436a8b11cf..bee4100fa2b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v6 - name: Install pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/ac...
[ ".github/workflows/test.yml" ]
[]
true
Snailclimb/JavaGuide
2,798
issue_to_patch
fix: 修正路由示例错误
`"*"` 匹配一个单词,`"*.client.#"` 和 路由键 `"com.rabbitmq.client"` 不匹配
6798a05ff1a7af52b850f5ddcf1ce2c287cdd116
0f960e3a7884a90ae9e4948023b4d90714ba9fd2
diff --git a/docs/high-performance/message-queue/rabbitmq-questions.md b/docs/high-performance/message-queue/rabbitmq-questions.md index 18ab3b57943..343e69e17b4 100644 --- a/docs/high-performance/message-queue/rabbitmq-questions.md +++ b/docs/high-performance/message-queue/rabbitmq-questions.md @@ -130,7 +130,7 @@ Rab...
[ "docs/high-performance/message-queue/rabbitmq-questions.md" ]
[]
true
Snailclimb/JavaGuide
2,796
issue_to_patch
Fix typo in RabbitMQ documentation
3a9524cd6dfa06a1823c76ff652ee4efac250415
ae94636434477b27afeb1e9e33334242505b1451
diff --git a/docs/high-performance/message-queue/rabbitmq-questions.md b/docs/high-performance/message-queue/rabbitmq-questions.md index 17d213f0121..6a66c6301cf 100644 --- a/docs/high-performance/message-queue/rabbitmq-questions.md +++ b/docs/high-performance/message-queue/rabbitmq-questions.md @@ -62,7 +62,7 @@ Excha...
[ "docs/high-performance/message-queue/rabbitmq-questions.md" ]
[]
true
Snailclimb/JavaGuide
2,795
issue_to_patch
Shell编程基础知识总结关系运算符部分示例代码勘误 示例代码无法正常运行,会报错[: 90: unary operator expected,但是底部的截图是正确的,可能是少打了? 原因是变量可能为空,于是产生中括号与另一个变量相比从而缺少中括号的情况,应改为[[ ]] 示例代码如下 `#!/bin/bash score=90 maxsscore=100 if [[ $score -eq $maxscore ]] then echo "A" else echo "B" fi` 运行结果 ![Image](https://github.com/user-attachments/assets/2...
Fix Shell script examples to use double brackets for safer variable comparison
Fixes #2653. Changed single brackets [ ] to double brackets [[ ]] in Shell script examples to prevent "unary operator expected" errors when variables are empty. Double brackets are more robust and handle edge cases better in Bash conditionals.
5738a150612c860048cc03f047eee647fc3e7d32
159044c23570bfb0110ed8b3905853754e2726fc
diff --git a/docs/cs-basics/operating-system/shell-intro.md b/docs/cs-basics/operating-system/shell-intro.md index d3bf6da4024..3bac77fc552 100644 --- a/docs/cs-basics/operating-system/shell-intro.md +++ b/docs/cs-basics/operating-system/shell-intro.md @@ -286,7 +286,7 @@ echo "Total value : $val" #!/bin/bash score=9...
[ "docs/cs-basics/operating-system/shell-intro.md" ]
[]
true
Snailclimb/JavaGuide
2,790
issue_to_patch
Update ConcurrentHashMap summary for Java 8
Clarified the behavior of ConcurrentHashMap in Java 8 regarding the transition from linked lists to red-black trees based on collision thresholds.
744d1dd4346658763af50496c4eef4cc1bc54b28
90135e9960e2a7910845e265c87d18c29c2981a7
diff --git a/docs/java/collection/concurrent-hash-map-source-code.md b/docs/java/collection/concurrent-hash-map-source-code.md index 25860c57ee2..695fbf108fe 100644 --- a/docs/java/collection/concurrent-hash-map-source-code.md +++ b/docs/java/collection/concurrent-hash-map-source-code.md @@ -662,7 +662,7 @@ public V ge...
[ "docs/java/collection/concurrent-hash-map-source-code.md" ]
[]
true
Snailclimb/JavaGuide
2,794
issue_to_patch
补充了关于并发编程的知识
添加了一些在我秋招春招面试过程中,遇到的一些被问住的问题,以及在其他地方看到的,可以和面试官展示深度的问题,比如非常常见(尤其是字节)会问的AQS相关的东西。 以下是新增的列表: 1. 线程池的五种生命周期状态(RUNNING 到 TERMINATED)是怎么流转的、底层 ctl 变量怎么用位运算同时存状态和线程数; 2. Worker 内部类为什么要继承 AQS 搞个不可重入锁、runWorker() 和 getTask() 的执行流程; 3. 还有四种拒绝策略各自适合什么场景,顺带提了 Dubbo、Netty 这些框架是怎么自定义拒绝策略的,这里可以展示一波技术广度。 AQS章节里 1. volatile...
744d1dd4346658763af50496c4eef4cc1bc54b28
d11d56bea9ea96ec7e3d852456ca33e6d968ba18
diff --git a/docs/java/concurrent/aqs.md b/docs/java/concurrent/aqs.md index 2ac1a44c594..8f45336ebbc 100644 --- a/docs/java/concurrent/aqs.md +++ b/docs/java/concurrent/aqs.md @@ -199,6 +199,93 @@ AQS 定义两种资源共享方式:`Exclusive`(独占,只有一个线程 一般来说,自定义同步器的共享方式要么是独占,要么是共享,他们也只需实现`tryAcquire-tryRelease`、`tryAcquireShared-tryRe...
[ "docs/java/concurrent/aqs.md", "docs/java/concurrent/java-concurrent-questions-02.md", "docs/java/concurrent/java-concurrent-questions-03.md", "docs/java/concurrent/java-thread-pool-summary.md" ]
[]
true
Snailclimb/JavaGuide
2,787
issue_to_patch
fix: Fix formatting in distributed-id.md
看到有个格式问题,尝试做点微薄的贡献
bff8cc6450d963f94e8ede3c720a2849dfdc6dfe
c07482a539f21ed41363c2f57aeb6d134b087716
diff --git a/docs/distributed-system/distributed-id.md b/docs/distributed-system/distributed-id.md index d585d605da1..fd117f94e2c 100644 --- a/docs/distributed-system/distributed-id.md +++ b/docs/distributed-system/distributed-id.md @@ -359,7 +359,7 @@ Snowflake 是 Twitter 开源的分布式 ID 生成算法。Snowflake 由 64 bit #### Snowf...
[ "docs/distributed-system/distributed-id.md" ]
[]
true
Snailclimb/JavaGuide
2,788
issue_to_patch
Enhance explanation of MySQL redo log and binlog handling
Clarified the two-phase commit process for redo log and binlog in MySQL, emphasizing the importance of data consistency during failures.
643b19fd96ac09d0ba16f1485453917c4382d72b
804e53cef9a6555a4235fdde6aa88c45bbcc1eaa
diff --git a/docs/database/mysql/how-sql-executed-in-mysql.md b/docs/database/mysql/how-sql-executed-in-mysql.md index 1452aef7aef..45a1d8d79ef 100644 --- a/docs/database/mysql/how-sql-executed-in-mysql.md +++ b/docs/database/mysql/how-sql-executed-in-mysql.md @@ -120,11 +120,12 @@ update tb_student A set A.age='19' wh...
[ "docs/database/mysql/how-sql-executed-in-mysql.md" ]
[]
true
Snailclimb/JavaGuide
2,785
issue_to_patch
Fix typo in 'GitHub Topics' section
笔误:Github实用小技巧总结->善用 Github Explore->2. Githunb Topics 按照类别……其中Github写为了Githunb
4baa23dae1e86475b151fc62308d3f3b02891e2a
932df0995ee427e58307fe3aea6ddf86202fe003
diff --git a/docs/tools/git/github-tips.md b/docs/tools/git/github-tips.md index a6fea00237a..f293c846f56 100644 --- a/docs/tools/git/github-tips.md +++ b/docs/tools/git/github-tips.md @@ -129,7 +129,7 @@ Github 前段时间推出的 Codespaces 可以提供类似 VS Code 的在线 IDE 简单来说,Github Explore 可以为你带来下面这些服务: 1. 可以根据你的个人兴趣为你推荐项目; -2. Git...
[ "docs/tools/git/github-tips.md" ]
[]
true
Snailclimb/JavaGuide
2,784
issue_to_patch
docs: typo
Fix typos in java-basic-questions-01.md
52ad540f0b8d7e7a9ca646fcb36f719343bc32e3
1dbc9c4e75bdb956fcc1b04aa6d02aa281f2aa7c
diff --git a/docs/java/basis/java-basic-questions-01.md b/docs/java/basis/java-basic-questions-01.md index cab51309a95..e94ed828592 100644 --- a/docs/java/basis/java-basic-questions-01.md +++ b/docs/java/basis/java-basic-questions-01.md @@ -18,8 +18,8 @@ head: 1. 简单易学(语法简单,上手容易); 2. 面向对象(封装,继承,多态); -3. 平台无关性( Java ...
[ "docs/java/basis/java-basic-questions-01.md" ]
[]
true
Snapchat/KeyDB
666
issue_to_patch
Throw error for invalid --replica-of configuration When multiple `--replica-of` arguments are passed before `--multi-master yes` and `--active-replica yes` the replication is actually gets incorrectly set up. Please throw error instead of relying users on reading the small print in the docs https://docs.keydb.dev/d...
Throw load error when replicaof config is before active-replica or multi-master configs
Multi-master doesn't work correctly if the configs are not set in the right order, so throw a load error rather than allow the user to start up with a bad config and have an incorrectly functioning server. https://docs.keydb.dev/docs/multi-master/#config-file Fixes #665.
dc419a4e6e929982a6a89b2298c62eb9a8c28f7c
2fa0cfe987f1a4fe6b9f5f4367b630c5250a4f09
diff --git a/src/config.cpp b/src/config.cpp index 71c6ad34d..78cdb3877 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -749,6 +749,18 @@ void loadServerConfigFromString(char *config) { g_pserver->fActiveReplica = CONFIG_DEFAULT_ACTIVE_REPLICA; err = "argument must be 'yes' or 'no'...
[ "src/config.cpp" ]
[]
true
Snapchat/KeyDB
801
issue_to_patch
Error while building on MacOS M1 **Describe the bug** ``` debug.cpp:1138:42: error: no member named '__srr0' in '__darwin_arm_thread_state64' return (void*) uc->uc_mcontext->__ss.__srr0; ~~~~~~~~~~~~~~~~~~~~~ ^ ``` **To reproduce** Follow the steps to build KeyDB **Expected behavior*...
I think we want ARM's program counter here.
Fixes #797
2cb5d710734849599697cd3405db1d2cd46b1bbc
5cc3ef449cda8119d40f5af2d755ae7a66c898ca
diff --git a/src/debug.cpp b/src/debug.cpp index f30d8f698..149a1e929 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -1135,7 +1135,7 @@ static void *getMcontextEip(ucontext_t *uc) { #elif defined(__i386__) return (void*) uc->uc_mcontext->__ss.__eip; #else - return (void*) uc->uc_mcontext->__ss.__sr...
[ "src/debug.cpp" ]
[]
true
Snapchat/KeyDB
803
issue_to_patch
WIP: Add support to use system libraries
These patches add support to optionally use system libraries instead of the vendored (or embedded) projects. This was requested in #493. I'm sending what I've got for now to avoid duplicated work, even though this does not seem to be passing the tests yet. I'll try to check which commit makes it fail next week. I've le...
2cb5d710734849599697cd3405db1d2cd46b1bbc
657229a9ac6e7c9d9820bf74061c1e0a4a12f927
diff --git a/deps/Makefile b/deps/Makefile index 28cf4e01d..7ef872784 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -34,11 +34,17 @@ ifneq ($(shell sh -c '[ -f .make-ldflags ] && cat .make-ldflags || echo none'), endif distclean: +ifneq ($(USE_SYSTEM_HIREDIS),yes) -(cd hiredis && $(MAKE) clean) > /dev/null ||...
[ "deps/Makefile", "pkg/deb/debian_dh9/patches/0007-Add-support-for-a-USE_SYSTEM_HIREDIS-flag.patch", "pkg/deb/debian_dh9/patches/0010-Add-support-for-USE_SYSTEM_JEMALLOC-flag.patch", "pkg/deb/debian_dh9/patches/series", "src/Makefile", "src/cli_common.c", "src/keydb-diagnostic-tool.cpp", "src/motd.cpp"...
[]
true
Snapchat/KeyDB
804
issue_to_patch
Update README.md
intented -> intended
2cb5d710734849599697cd3405db1d2cd46b1bbc
bb8bb92aa8d93fb54075465757f6da97c6aa1034
diff --git a/README.md b/README.md index 34d5b3fdc..56a0ae2d4 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ The minimum number of clients on a thread before KeyDB assigns new connections t ``` replica-weighting-factor 2 ``` -KeyDB will attempt to balance clients across threads evenly; However, replica cli...
[ "README.md" ]
[]
true
Snapchat/KeyDB
667
issue_to_patch
Update RPM script for Rocky Linux 9
KeyDB compiles on Rocky Linux 9 and 'make test' passes completely. However, the RPM package generation script was incompatible, as it relied on the version information of CentOS packages that were not available on Rocky Linux. This pull request uses the 'dist' RPM macro instead, which works on CentOS 7 and 8 as well. ...
05430586d1bb535d9d424a399f49e8fc2770de73
00f3e4513b3e074df8b13457d50fad16fb25868a
diff --git a/pkg/rpm/generate_rpms.sh b/pkg/rpm/generate_rpms.sh index be5d67a7c..ba4cd17c8 100755 --- a/pkg/rpm/generate_rpms.sh +++ b/pkg/rpm/generate_rpms.sh @@ -5,10 +5,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" version=$(grep KEYDB_REAL_VERSION $DIR/../../src/version.h | awk '{ p...
[ "pkg/rpm/generate_rpms.sh" ]
[]
true
Snapchat/KeyDB
780
issue_to_patch
fix build on 32bit systems
The replication code has an assert that tests if `sizeof(long) == sizeof(long long)`, which obviously fails on 32-bit architectures. I believe the assert is incorrect on any architecture, considering the following code is actually putting a long long in an _int_ (`rsi.repl_stream_db`). I replaced it with code tha...
2ad14dec88a523f957f618d09c27db01c573d156
91a2a8fa2a19cbdb22110b9723a5172269e165bd
diff --git a/src/replication.cpp b/src/replication.cpp index df47cb91a..e009731e8 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -2608,8 +2608,11 @@ bool readSnapshotBulkPayload(connection *conn, redisMaster *mi, rdbSaveInfo &rsi if (mi->parseState->depth() != 0) return fals...
[ "src/replication.cpp" ]
[]
true
Snapchat/KeyDB
753
issue_to_patch
Add more detail to the panic messages in blocked.cpp
I've had the panic in `replyToBlockedClientTimedOut` happen in production, and I'd like to be able to get more information from it.
674d9fb7eea1e6cca6ac8da3b2d1a63dc38c9d2b
8c83f14719978c10408a5cca9248db6349ec3a4c
diff --git a/src/blocked.cpp b/src/blocked.cpp index 56df022ea..e10985156 100644 --- a/src/blocked.cpp +++ b/src/blocked.cpp @@ -208,7 +208,8 @@ void unblockClient(client *c) { listDelNode(g_pserver->paused_clients,c->paused_list_node); c->paused_list_node = NULL; } else { - serverPanic("U...
[ "src/blocked.cpp" ]
[]
true
Snapchat/KeyDB
738
issue_to_patch
Fix swapdb bugs when multiple clients involved.
This PR fixes couple of bugs related to swapdb. Following are the list of bugs: ## Bug 1: Incorrect swapdb results in multiple clients (or cli) from different terminals **Terminal 1 (cli)** ``` 192.168.0.20:9000> DBSIZE (integer) 0 192.168.0.20:9000> set k0 v0 OK 192.168.0.20:9000> DBSIZE (integer) 1 192.16...
de3c218a02e9fd98e958fba40c89cc5080f3a225
67502eb573d6639e74d78b403d8d8850b861f031
diff --git a/src/db.cpp b/src/db.cpp index 3e29801a7..bc58c0e84 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1723,16 +1723,17 @@ int dbSwapDatabases(int id1, int id2) { id2 < 0 || id2 >= cserver.dbnum) return C_ERR; if (id1 == id2) return C_OK; std::swap(g_pserver->db[id1], g_pserver->db[id2]); - ...
[ "src/db.cpp", "src/multi.cpp", "src/server.cpp", "src/server.h" ]
[]
true
Snapchat/KeyDB
746
issue_to_patch
refactor asyncwrite and asyncread work queue
Refactor async write and async read work queues
1d59efbfbd1f0d8b3a613084139f89ce5ac5c8b2
a1d47ac0dffac7a9be6af4be6c9d01ab51eccfd9
diff --git a/src/config.cpp b/src/config.cpp index a8217e7bc..fbe97dd0f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -361,7 +361,7 @@ bool initializeStorageProvider(const char **err) // Create The Storage Factory (if necessary) serverLog(LL_NOTICE, "Initializing FLASH storage provider (...
[ "src/config.cpp", "src/db.cpp", "src/server.cpp", "src/server.h", "src/storage/rocksdb.cpp", "src/storage/rocksdbfactor_internal.h", "src/storage/rocksdbfactory.cpp", "src/storage/rocksdbfactory.h" ]
[]
true
Snapchat/KeyDB
762
issue_to_patch
Update README.md
674d9fb7eea1e6cca6ac8da3b2d1a63dc38c9d2b
9fc22dcf4fe8e392545b4a9e130433694a0494c6
diff --git a/README.md b/README.md index 20adc97fe..34d5b3fdc 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,6 @@ Join us on [Slack](https://docs.keydb.dev/slack/) Learn more using KeyDB's extensive [documentation](https://docs.keydb.dev) -Post to our [Community Forum](https://community.keydb.dev) - See the ...
[ "README.md" ]
[]
true
Snapchat/KeyDB
727
issue_to_patch
commitChanges async api
Hi John, Please review. I am testing SET commands and just did basic testing now. This might not be ready to merge yet until I validate the changes but please provide your review comments. Thanks
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/IStorage.h b/src/IStorage.h index 79726daf5..82f8087a0 100644 --- a/src/IStorage.h +++ b/src/IStorage.h @@ -7,6 +7,13 @@ #define METADATA_DB_IDENTIFIER "c299fde0-6d42-4ec4-b939-34f680ffe39f" struct StorageToken { + enum class TokenType { + SingleRead, + SingleWrite, + Delete...
[ "src/IStorage.h", "src/StorageCache.cpp", "src/StorageCache.h", "src/db.cpp", "src/storage/rocksdb.cpp", "src/storage/rocksdb.h" ]
[ { "comment": "remove this", "path": "src/storage/rocksdb.cpp", "hunk": "@@ -255,6 +255,39 @@ void RocksDBStorageProvider::endWriteBatch()\n m_lock.unlock();\n }\n \n+struct BatchStorageToken : public StorageToken {\n+ std::shared_ptr<rocksdb::DB> tspdb; // Note: This must be first so it is del...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
remove this
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 16aed43b7..56f00821f 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -255,6 +255,31 @@ void RocksDBStorageProvider::endWriteBatch() m_lock.unlock(); } +struct BatchStorageToken : public StorageToken { + std::shared_ptr...
[ "src/storage/rocksdb.cpp" ]
[ { "comment": "remove this", "path": "src/storage/rocksdb.cpp", "hunk": "@@ -255,6 +255,39 @@ void RocksDBStorageProvider::endWriteBatch()\n m_lock.unlock();\n }\n \n+struct BatchStorageToken : public StorageToken {\n+ std::shared_ptr<rocksdb::DB> tspdb; // Note: This must be first so it is del...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
naming convention , make it unique_ptr and transfer ownership and release lock in complete
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 16aed43b7..56f00821f 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -255,6 +255,31 @@ void RocksDBStorageProvider::endWriteBatch() m_lock.unlock(); } +struct BatchStorageToken : public StorageToken { + std::shared_ptr...
[ "src/storage/rocksdb.cpp" ]
[ { "comment": "naming convention , make it unique_ptr and transfer ownership and release lock in complete ", "path": "src/storage/rocksdb.cpp", "hunk": "@@ -255,6 +255,39 @@ void RocksDBStorageProvider::endWriteBatch()\n m_lock.unlock();\n }\n \n+struct BatchStorageToken : public StorageToken {\n+ ...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
remove commented out code
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/db.cpp b/src/db.cpp index 013473163..9a0f35684 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -3087,7 +3087,14 @@ void redisDbPersistentData::commitChanges(const redisDbPersistentDataSnapshot ** m_pdbSnapshotStorageFlush = nullptr; } if (m_spstorage != nullptr) - m_spstorage->end...
[ "src/db.cpp" ]
[ { "comment": "remove commented out code", "path": "src/db.cpp", "hunk": "@@ -3086,8 +3088,22 @@ void redisDbPersistentData::commitChanges(const redisDbPersistentDataSnapshot **\n *psnapshotFree = m_pdbSnapshotStorageFlush;\n m_pdbSnapshotStorageFlush = nullptr;\n }\n+ \n if (m...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
Remove this case
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/db.cpp b/src/db.cpp index 013473163..9a0f35684 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -3087,7 +3087,14 @@ void redisDbPersistentData::commitChanges(const redisDbPersistentDataSnapshot ** m_pdbSnapshotStorageFlush = nullptr; } if (m_spstorage != nullptr) - m_spstorage->end...
[ "src/db.cpp" ]
[ { "comment": "Remove this case", "path": "src/db.cpp", "hunk": "@@ -3451,11 +3464,26 @@ void redisDbPersistentData::processStorageToken(StorageToken *tok) {\n serverAssert(db->m_setexpire->find(key) != db->m_setexpire->end());\n }\n serverAssert(o->FExpires() == (...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
We should assert if we get here
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/db.cpp b/src/db.cpp index 013473163..9a0f35684 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -3087,7 +3087,14 @@ void redisDbPersistentData::commitChanges(const redisDbPersistentDataSnapshot ** m_pdbSnapshotStorageFlush = nullptr; } if (m_spstorage != nullptr) - m_spstorage->end...
[ "src/db.cpp" ]
[ { "comment": "We should assert if we get here", "path": "src/db.cpp", "hunk": "@@ -3451,11 +3464,26 @@ void redisDbPersistentData::processStorageToken(StorageToken *tok) {\n serverAssert(db->m_setexpire->find(key) != db->m_setexpire->end());\n }\n serverAssert(o->...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
Remove debugging logs or set to LL_DEBUG
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 16aed43b7..56f00821f 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -255,6 +255,31 @@ void RocksDBStorageProvider::endWriteBatch() m_lock.unlock(); } +struct BatchStorageToken : public StorageToken { + std::shared_ptr...
[ "src/storage/rocksdb.cpp" ]
[ { "comment": "Remove debugging logs or set to LL_DEBUG", "path": "src/storage/rocksdb.cpp", "hunk": "@@ -255,6 +255,38 @@ void RocksDBStorageProvider::endWriteBatch()\n m_lock.unlock();\n }\n \n+struct BatchStorageToken : public StorageToken {\n+ std::shared_ptr<rocksdb::DB> tspdb; // Note: Th...
true
Snapchat/KeyDB
727
comment_to_fix
commitChanges async api
remove
b0935de746014490b0cc654e6c89528a5a66a49e
59719a8fc332f6e67b409cc5a288fc5a74437898
diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 16aed43b7..56f00821f 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -255,6 +255,31 @@ void RocksDBStorageProvider::endWriteBatch() m_lock.unlock(); } +struct BatchStorageToken : public StorageToken { + std::shared_ptr...
[ "src/storage/rocksdb.cpp" ]
[ { "comment": "remove", "path": "src/storage/rocksdb.cpp", "hunk": "@@ -255,6 +255,38 @@ void RocksDBStorageProvider::endWriteBatch()\n m_lock.unlock();\n }\n \n+struct BatchStorageToken : public StorageToken {\n+ std::shared_ptr<rocksdb::DB> tspdb; // Note: This must be first so it is deleted ...
true
Snapchat/KeyDB
737
issue_to_patch
[BUG] Impossible to build on MacOS MacOS: 14.0 Tried 6.3.3, unstable, the same result: ``` cd src && make all make[1]: Entering directory '/private/tmp/KeyDB/src' cat: /etc/os-release: No such file or directory CC Makefile.dep cat: /etc/os-release: No such file or directory rm -rf keydb-server keydb-s...
stat64 is deprecated on mac
fixes #729
de3c218a02e9fd98e958fba40c89cc5080f3a225
033de9ac9c893d587dcaac81088d99d37dfbbb72
diff --git a/src/config.h b/src/config.h index feb9ee310..65f793383 100644 --- a/src/config.h +++ b/src/config.h @@ -41,14 +41,10 @@ #define CONFIG_DEFAULT_RDB_FILENAME "dump.rdb" -/* Define redis_fstat to fstat or fstat64() */ -#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6) -#define redis_fstat fstat64...
[ "src/config.h" ]
[]
true
Snapchat/KeyDB
722
issue_to_patch
Fixing some compile issues for alpine and centos, also fix endian issue for FLASH hashslot prefix
Current implementation of hash slot prefix resulted in incorrect enumeration due to using the wrong 2 bytes, so just use the whole value. Fixes issue #677. also update alpine version in Dockerfile Fixes issue #721.
7049b5f4e8dbeb4d1c9781df6f18314c862f9720
0449579db0f5160e063e8ef5dfbe1c80d488d397
diff --git a/pkg/docker/Dockerfile_Alpine b/pkg/docker/Dockerfile_Alpine index 7ff44a1df..2787eda0b 100644 --- a/pkg/docker/Dockerfile_Alpine +++ b/pkg/docker/Dockerfile_Alpine @@ -1,4 +1,4 @@ -FROM alpine:3.12 +FROM alpine:3.18 # add our user and group first to make sure their IDs get assigned consistently, regardles...
[ "pkg/docker/Dockerfile_Alpine", "src/Makefile", "src/readwritelock.h", "src/server.h", "src/storage/rocksdb.cpp", "src/storage/rocksdb.h", "src/storage/rocksdbfactory.cpp" ]
[ { "comment": "You want uint16_t not unsigned, otherwise your wasting 2 bytes for every key", "path": "src/storage/rocksdb.cpp", "hunk": "@@ -25,7 +27,7 @@ bool FInternalKey(const char *key, size_t cch)\n std::string getPrefix(unsigned int hashslot)\n {\n char *hash_char = (char *)&hashslot;\n- re...
true
Snapchat/KeyDB
722
comment_to_fix
Fixing some compile issues for alpine and centos, also fix endian issue for FLASH hashslot prefix
Why is alpine using free?
7049b5f4e8dbeb4d1c9781df6f18314c862f9720
0449579db0f5160e063e8ef5dfbe1c80d488d397
diff --git a/src/server.h b/src/server.h index 7983c6dc7..57b4253f8 100644 --- a/src/server.h +++ b/src/server.h @@ -3923,7 +3923,7 @@ void updateActiveReplicaMastersFromRsi(rdbSaveInfo *rsi); uint64_t getMvccTstamp(); void incrementMvccTstamp(); -#if __GNUC__ >= 7 && !defined(NO_DEPRECATE_FREE) +#if __GNUC__ >= 7 ...
[ "src/server.h" ]
[ { "comment": "Why is alpine using free?", "path": "src/server.h", "hunk": "@@ -3923,7 +3923,7 @@ void updateActiveReplicaMastersFromRsi(rdbSaveInfo *rsi);\n uint64_t getMvccTstamp();\n void incrementMvccTstamp();\n \n-#if __GNUC__ >= 7 && !defined(NO_DEPRECATE_FREE)\n+#if __GNUC__ >= 7 && !defined(NO_DE...
true
Snapchat/KeyDB
704
issue_to_patch
Add KEYDB_PASSWORD env variable to Dockerfiles (#220)
This add a password environment variable to the Dockerfiles and is an implementation of the request in #220 .
441b74a936f46724f93a2810c90dafd8dcce06a5
de1af7a8790b95415d9cebbf7141f104b3790a03
diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile index 9dc57b95b..d1910adad 100644 --- a/pkg/docker/Dockerfile +++ b/pkg/docker/Dockerfile @@ -97,6 +97,10 @@ RUN set -eux; \ echo 'if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \ echo ' ...
[ "pkg/docker/Dockerfile", "pkg/docker/Dockerfile_Alpine" ]
[]
true
Snapchat/KeyDB
702
issue_to_patch
Fix integer overflow issue in the temp rdb file naming
This is to fix a bug related to integer overflow issue in the temp rdb file naming, especially in the current time (in milliseconds) portion in the file name. It is possible that the temp rdb file name (i.e., `temp-<timestamp>.<pid>.rdb`) might have incorrect (possibly negative) timestamp value. Therefore, it is pre...
441b74a936f46724f93a2810c90dafd8dcce06a5
e0f601fda91bc1bc68481d22268af80e273b1736
diff --git a/src/replication.cpp b/src/replication.cpp index ee3583692..c7034eca1 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -3738,7 +3738,7 @@ void syncWithMaster(connection *conn) { auto dt = std::chrono::system_clock::now().time_since_epoch(); auto dtMillisecond = std::ch...
[ "src/replication.cpp" ]
[]
true
Snapchat/KeyDB
706
issue_to_patch
[BUG] Build error with GCC 13.1.1 on Fedora 38 **Describe the bug** Building KeyDB on the `main ` (commit `c17b9f47acc6654bb7b4fd190b73b1f4d5188ec5`) fails with GCC 13.1.1 on Fedora 38. **Expected behavior** KeyDB builds successfully. **Additional information** Error log: > t_zset.cpp:2039:11: ошибка...
Fix newer GCC build issues (rename zset to iterzset)
This should fix build issues on newer GCC versions. closes #684
441b74a936f46724f93a2810c90dafd8dcce06a5
806e2503c523800eb52e2c8fa89386b5b2aac435
diff --git a/src/t_zset.cpp b/src/t_zset.cpp index 2ee1d3cc9..f5947367a 100644 --- a/src/t_zset.cpp +++ b/src/t_zset.cpp @@ -2036,7 +2036,7 @@ struct zsetopsrc { zset *zs; zskiplistNode *node; } sl; - } zset; + } iterzset; } iter; }; @@ -2085,7 +2085,...
[ "src/t_zset.cpp" ]
[]
true
Snapchat/KeyDB
718
issue_to_patch
Fix a bug where flash CF options are being reset to default after flushall
This fixes the bug https://github.com/Snapchat/KeyDB/issues/717. @paulmchen @hengku @yzhao244
38169682f0d16b2942910650faf5567e33ee6b2b
8f89e5de33b5dae171d85f3bd25f20d0edfa9e1a
diff --git a/src/storage/rocksdb.cpp b/src/storage/rocksdb.cpp index 3d97a94fe..8aff86959 100644 --- a/src/storage/rocksdb.cpp +++ b/src/storage/rocksdb.cpp @@ -144,12 +144,13 @@ void RocksDBStorageProvider::retrieve(const char *key, size_t cchKey, callbackSi size_t RocksDBStorageProvider::clear() { size_t celem...
[ "src/storage/rocksdb.cpp" ]
[]
true
Snapchat/KeyDB
720
issue_to_patch
Merge latest internal to OSS
Adds flash eviction/expire, cross slot mget, and statsd module. Fixes for #714, #676, #675, #671, #645, #619, #717.
5f5753ae5330c02f7c387c55656a1f51dfa64091
08b0716f0b6157d19ceada68eb30a60d14c44109
diff --git a/build.yaml b/build.yaml index 744ae947a..63667f283 100644 --- a/build.yaml +++ b/build.yaml @@ -3,7 +3,7 @@ version: 1 machamp: keydb-build: # Optional - build counter is linked to the build def - tag_template: 0.0.%build.counter% + tag_template: "0.0.%build.counter%-%sha%" # Optional -...
[ "build.yaml", "ci.yaml", "deps/cpp-statsd-client/.clang-format", "deps/cpp-statsd-client/.github/workflows/coverage.yml", "deps/cpp-statsd-client/.github/workflows/lint.yml", "deps/cpp-statsd-client/.github/workflows/linux.yml", "deps/cpp-statsd-client/.github/workflows/windows.yml", "deps/cpp-statsd-...
[]
diff --git a/deps/cpp-statsd-client/tests/StatsdServer.hpp b/deps/cpp-statsd-client/tests/StatsdServer.hpp new file mode 100644 index 000000000..e87fe5933 --- /dev/null +++ b/deps/cpp-statsd-client/tests/StatsdServer.hpp @@ -0,0 +1,80 @@ +#ifndef STATSD_SERVER_HPP +#define STATSD_SERVER_HPP + +// It might make sense to...
true
Snapchat/KeyDB
712
issue_to_patch
Async FLASH Design: AE event loop changes to understand StorageToken
Hi, Based on https://github.com/Snapchat/KeyDB/wiki/Async-FLASH-Design, This implementation covers the changes for Ae Async operations and callbacks processing. According to the design, aePostFunction is overloaded to support a third function type typedef void aePostFunctionTokenProc(aeEventLoop *el, StorageToken *t...
441b74a936f46724f93a2810c90dafd8dcce06a5
90dc6993b2f13085568d9649cddb51c892e85714
diff --git a/src/ae.cpp b/src/ae.cpp index 99093daa8..a43969fe0 100644 --- a/src/ae.cpp +++ b/src/ae.cpp @@ -113,6 +113,8 @@ enum class AE_ASYNC_OP PostCppFunction, DeleteFileEvent, CreateFileEvent, + PostAsynDBFunction, + }; struct aeCommand @@ -125,6 +127,8 @@ struct aeCommand aePostFun...
[ "src/ae.cpp", "src/ae.h" ]
[ { "comment": "Follow the pattern in AE_ASYNC_OP::PostFunction. We don't acquire and release the lock for each loop iteration because it results in worse performance.", "path": "src/ae.cpp", "hunk": "@@ -175,6 +179,15 @@ void aeProcessCmd(aeEventLoop *eventLoop, int fd, void *, int )\n (*cmd...
true
Snapchat/KeyDB
712
comment_to_fix
Async FLASH Design: AE event loop changes to understand StorageToken
Follow the pattern in AE_ASYNC_OP::PostFunction. We don't acquire and release the lock for each loop iteration because it results in worse performance.
441b74a936f46724f93a2810c90dafd8dcce06a5
90dc6993b2f13085568d9649cddb51c892e85714
diff --git a/src/ae.cpp b/src/ae.cpp index 99093daa8..a43969fe0 100644 --- a/src/ae.cpp +++ b/src/ae.cpp @@ -113,6 +113,8 @@ enum class AE_ASYNC_OP PostCppFunction, DeleteFileEvent, CreateFileEvent, + PostAsynDBFunction, + }; struct aeCommand @@ -125,6 +127,8 @@ struct aeCommand aePostFun...
[ "src/ae.cpp" ]
[ { "comment": "Follow the pattern in AE_ASYNC_OP::PostFunction. We don't acquire and release the lock for each loop iteration because it results in worse performance.", "path": "src/ae.cpp", "hunk": "@@ -175,6 +179,15 @@ void aeProcessCmd(aeEventLoop *eventLoop, int fd, void *, int )\n (*cmd...
true
Snapchat/KeyDB
712
comment_to_fix
Async FLASH Design: AE event loop changes to understand StorageToken
If you call it here then it defeats the purpose of writing it to the pipe (you will call it twice). Please remove.
441b74a936f46724f93a2810c90dafd8dcce06a5
90dc6993b2f13085568d9649cddb51c892e85714
diff --git a/src/ae.cpp b/src/ae.cpp index 99093daa8..a43969fe0 100644 --- a/src/ae.cpp +++ b/src/ae.cpp @@ -113,6 +113,8 @@ enum class AE_ASYNC_OP PostCppFunction, DeleteFileEvent, CreateFileEvent, + PostAsynDBFunction, + }; struct aeCommand @@ -125,6 +127,8 @@ struct aeCommand aePostFun...
[ "src/ae.cpp" ]
[ { "comment": "If you call it here then it defeats the purpose of writing it to the pipe (you will call it twice). Please remove.", "path": "src/ae.cpp", "hunk": "@@ -256,6 +269,21 @@ int aePostFunction(aeEventLoop *eventLoop, aePostFunctionProc *proc, void *arg)\n return AE_OK;\n }\n \n+int aePostF...
true
Snapchat/KeyDB
682
issue_to_patch
[BUG] Alpine image doesn't reap zombie processes **Describe the bug** KeyDB Helm chart is using wrapper shell scripts for k8s liveness/readiness probes. Each execution will leave a defunct process as init process (keydb-server) isn't reaping zombie processes. Pods will eventually be restarted as no new processes ca...
Use tini in Alpine-based Docker image
Fixes #681
c17b9f47acc6654bb7b4fd190b73b1f4d5188ec5
b60a2b2eff2e688c63f0b46fd03dc99763f4406d
diff --git a/pkg/docker/Dockerfile_Alpine b/pkg/docker/Dockerfile_Alpine index 80b35819c..dbdb89f1a 100644 --- a/pkg/docker/Dockerfile_Alpine +++ b/pkg/docker/Dockerfile_Alpine @@ -5,7 +5,7 @@ RUN mkdir -p /etc/keydb ARG BRANCH RUN set -eux; \ \ - apk add --no-cache su-exec; \ + apk add --no-ca...
[ "pkg/docker/Dockerfile_Alpine" ]
[]
true
Snapchat/KeyDB
698
issue_to_patch
Fix a fug where repl-backlog-size config was modifed in keydb.conf with the runtime change during the config rewrite
There was a bug where original `repl-backlog-size` config value was overwritten by the config rewrite command received by the sentinel during the master/ replica switchover. Basically, the `repl-backlog-size` was resized to twice its original value when the usage was insufficient, and hence it was resized to the `re...
501ae473e18056a58ea075bc03da38707b7a6a9e
6f463997c8da6f4d104fa18eb2aff2574df2aaca
diff --git a/src/config.cpp b/src/config.cpp index 5d1827c5c..ad8425051 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -2933,7 +2933,7 @@ standardConfig configs[] = { createLongLongConfig("latency-monitor-threshold", NULL, MODIFIABLE_CONFIG, 0, LLONG_MAX, g_pserver->latency_monitor_threshold, 0, INTEGER_CONFI...
[ "src/config.cpp", "src/server.cpp" ]
[]
true
Snapchat/KeyDB
696
issue_to_patch
Fix a bug where a temp rdb file with zero bytes is generated in flash mode
This is a possible fix for the issue https://github.com/Snapchat/KeyDB/issues/695, as it skips temp rdb file creation with zero bytes when the rocksdb snapshot replication is enabled. @JohnSully / @msotheeswaran Could you please review the changes and merge? thanks. @paulmchen @hengku @yzhao244
6f77a8248015415bb9c3dcc10d40c4002eec1078
7ad12b8467c773fccc7be86d76a9b5b42d1b3413
diff --git a/src/replication.cpp b/src/replication.cpp index 56e5596b6..280043ace 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -3732,7 +3732,7 @@ void syncWithMaster(connection *conn) { } /* Prepare a suitable temp file for bulk transfer */ - if (!useDisklessLoad()) { + if (!useDiskle...
[ "src/replication.cpp" ]
[]
true
Snapchat/KeyDB
689
issue_to_patch
[BUG] redis-cli is unavailable in 6.3.3 **Describe the bug** Previously, redis-cli was available. This was a symlink to keydb-cli. In 6.3.3, the Dockerfile still tries to create a symlink, but in the wrong folder. Therefore it isn't available. **To reproduce** - build the docker image - run the docker image ...
Fix redis-cli symlink
Fixes #688
c17b9f47acc6654bb7b4fd190b73b1f4d5188ec5
e8710e40e90713f9f6ad70900ca1895e5a0fdeec
diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile index 0f2a63ba8..120a76c15 100644 --- a/pkg/docker/Dockerfile +++ b/pkg/docker/Dockerfile @@ -83,6 +83,7 @@ RUN \ sed -i 's/^\(logfile .*\)$/# \1/' /etc/keydb/keydb.conf; \ sed -i 's/protected-mode yes/protected-mode no/g' /etc/keydb/keydb.con...
[ "pkg/docker/Dockerfile", "pkg/docker/Dockerfile_Alpine" ]
[]
true
Snapchat/KeyDB
686
issue_to_patch
Fix typo in module.cpp
comparision -> comparison
c17b9f47acc6654bb7b4fd190b73b1f4d5188ec5
dc6acc5c91d905f9c7279a40fb652fa3a70efc3d
diff --git a/src/module.cpp b/src/module.cpp index 7bd32aebb..eceb80c75 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -7058,7 +7058,7 @@ RedisModuleString *RM_DictPrev(RedisModuleCtx *ctx, RedisModuleDictIter *di, voi /* Compare the element currently pointed by the iterator to the specified * element given by ...
[ "src/module.cpp" ]
[]
true
Snapchat/KeyDB
687
issue_to_patch
FLASH support in Docker image v6.3.3 We are using the `eqalpha/keydb` image and it seems that FLASH support was removed in `6.3.3`. When upgrading from `6.3.2` to `6.3.3` we get this error message: ``` To use the flash storage provider please compile KeyDB with ENABLE_FLASH=yes ``` Is this intended? If so, is ...
Enable KeyDB FLASH in Docker images
Fixes #685
c17b9f47acc6654bb7b4fd190b73b1f4d5188ec5
9128875f4995ebbad1f897dcae97e08343156a2b
diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile index 0f2a63ba8..656911dd7 100644 --- a/pkg/docker/Dockerfile +++ b/pkg/docker/Dockerfile @@ -53,7 +53,7 @@ RUN set -eux; \ grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' ./src/config.cpp; \ sed -ri 's!^( *createBoolConfig[(...
[ "pkg/docker/Dockerfile", "pkg/docker/Dockerfile_Alpine" ]
[]
true
Snapchat/KeyDB
668
issue_to_patch
Fix a bug where swapdb result was not recovered after keydb restarts in FLASH mode.
Fixes the issue https://github.com/Snapchat/KeyDB/issues/627. @JohnSully / @msotheeswaran this is the solution which I went through and discussed in our last Wednesday's meeting, please help review the fix and merge it. Thanks. @paulmchen @hengku @yzhao244
05430586d1bb535d9d424a399f49e8fc2770de73
df73aabef40baae44f944694259712f2e5a89be2
diff --git a/src/db.cpp b/src/db.cpp index dcf617c10..476908f5e 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1769,7 +1769,7 @@ int dbSwapDatabases(int id1, int id2) { /* SWAPDB db1 db2 */ void swapdbCommand(client *c) { - int id1, id2, oriId; + int id1, id2, oriIdx; /* Not allowed in cluster mode: we h...
[ "src/db.cpp", "src/server.cpp" ]
[]
true
Snapchat/KeyDB
662
issue_to_patch
[CRASH] **Crash report** Paste the complete crash log between the quotes below. Please include a few lines from the log preceding the crash report to provide some context. ``` 1:24:M 02 Jan 2023 04:42:24.096 * 10 changes in 300 seconds. Saving... 1:24:M 02 Jan 2023 04:42:24.096 * Background saving started 1:4...
keys after brpop causes crash due to timeout not being reset
Fixes #659. Fixes #605. Fixes #532.
ef8b1bf3730bd280b8d6fe8da7e5e725eb163a4c
0679aa888b6d38dc63b1d329d1683d2708483153
diff --git a/src/blocked.cpp b/src/blocked.cpp index 15f3087ce..56df022ea 100644 --- a/src/blocked.cpp +++ b/src/blocked.cpp @@ -732,6 +732,7 @@ void unblockClientWaitingData(client *c) { c->bpop.xread_group = NULL; c->bpop.xread_consumer = NULL; } + c->bpop.timeout = 0; } static int getBl...
[ "src/blocked.cpp", "tests/unit/type/list.tcl" ]
[]
diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index 36020c125..69c519a8e 100644 --- a/tests/unit/type/list.tcl +++ b/tests/unit/type/list.tcl @@ -1069,6 +1069,13 @@ start_server { r ping } {PONG} + test "Regression for bug 659 - chaining BRPOP with async blocking cmds" { + r...
true
Snapchat/KeyDB
653
issue_to_patch
[BUG] Many OOM messages being sent to clients in FLASH storage for cluster mode **Describe the bug** After enabling FLASH storage option in cluster mode, for the use case of using a fairly small maxmemory for cost saving to serve tremendous amount of data, clients side starts to see more and more OOM message being s...
Flash slot to key
This change replaces to the slot_to_key map when flash in enabled by prefixing each key with its hashslot when stored in rocksdb and using rocksdb prefix iter seek to replace functionality of the slot to key map. Also add --flash option to test scripts to run cluster tests with flash. maxmemory 100MB, `memtier_be...
f629a76a2eb09fa354a6bb10b7be46444d661f65
cdfca6a42bb271fee6ae2210879d8650eea0b093
diff --git a/build.yaml b/build.yaml new file mode 100644 index 000000000..7e524b9f7 --- /dev/null +++ b/build.yaml @@ -0,0 +1,53 @@ +# Doc: https://wiki.sc-corp.net/pages/viewpage.action?pageId=121500284 +version: 1 +machamp: + keydb-build: + # Optional - build counter is linked to the build def + tag_template:...
[ "build.yaml", "ci.yaml", "machamp_scripts/build.sh", "src/IStorage.h", "src/StorageCache.h", "src/db.cpp", "src/server.h", "src/storage/rocksdb.cpp", "src/storage/rocksdb.h", "src/storage/rocksdbfactory.cpp", "src/storage/teststorageprovider.cpp", "src/storage/teststorageprovider.h", "tests/...
[]
diff --git a/tests/instances.tcl b/tests/instances.tcl index d4270d091..db267f54d 100644 --- a/tests/instances.tcl +++ b/tests/instances.tcl @@ -21,6 +21,7 @@ set ::tls 0 set ::pause_on_error 0 set ::dont_clean 0 set ::simulate_error 0 +set ::flash 0 set ::failed 0 set ::sentinel_instances {} set ::redis_instance...
true
Snapchat/KeyDB
654
issue_to_patch
Fix aws s3 startup check preventing keydb from starting
During startup, when db-s3-object is set, keydb can't start and gets into error "could not access s3 bucket"
f629a76a2eb09fa354a6bb10b7be46444d661f65
7cb812302666d8e8fcd7c08af2b3004bbd05741d
diff --git a/src/config.cpp b/src/config.cpp index e176d3133..71c6ad34d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -2468,7 +2468,7 @@ static int isValidS3Bucket(char *s3bucket, const char **err) { if (pid == 0) { - execlp("aws", "aws", "s3", "ls", s3bucket); + execlp("aws", "aws", "s3...
[ "src/config.cpp" ]
[]
true
Snapchat/KeyDB
650
issue_to_patch
Install on FreeBSD error Hi, please help me. I’m trying to install KeyDB from git on the FreeBSD x64 12.2-Release, but I’m getting errors. The first thing I would like to clarify is what dependencies need to be installed before assembly and installation KeyDB? The documentation for ubuntu has such a list of depende...
Make it compile on FreeBSD
Should fix https://github.com/Snapchat/KeyDB/issues/364
e4dacb467fa518beb62c0c73300240faf60c1190
4eb2bb7321263377637cdbee4ba1a450f934c983
diff --git a/src/Makefile b/src/Makefile index f67f85b5a..21e80b725 100644 --- a/src/Makefile +++ b/src/Makefile @@ -145,7 +145,9 @@ FINAL_LDFLAGS=$(LDFLAGS) $(KEYDB_LDFLAGS) $(DEBUG) FINAL_LIBS+=-lm -lz -lcrypto -lbz2 -lzstd -llz4 -lsnappy ifneq ($(uname_S),Darwin) + ifneq ($(uname_S),FreeBSD) FINAL_LIBS+=-la...
[ "src/Makefile" ]
[]
true
Snapchat/KeyDB
279
issue_to_patch
Update to README and ascii logo
This PR updates our benchmark information in the readme, as well as references our new job posting. Also the build section links to a new doc which provides build instruction for other linux distros. The ascii logo has been updated with the KeyDB logo image
bc8cc1adb301d51e926f2552ce1eb28165ed569b
a643c66ca5c5ebdf261e61fa8b202eeabf55dc4b
diff --git a/README.md b/README.md index 246276bd3..de80070ce 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ ##### Have feedback? Take our quick survey: https://www.surveymonkey.com/r/Y9XNS93 +##### KeyDB is Hiring! We are currently building out our dev team. If you are interested please see the posting h...
[ "README.md", "src/asciilogo.h" ]
[]
true
Snapchat/KeyDB
644
issue_to_patch
[New KeyDB Conf] Add a configuration to disable the keycache (or storage cache) upfront **The problem/use-case that the feature addresses** Currently KeyDB maintains a keycache (or storage cache) for performance gains that provides caching functionality for the storage provider (e.g., rocksdb). As per the current beh...
add config to disable storage key cache
As requested in #642. Fixes #642.
a8c0f9b1c44f77e9a917bea603e469dbb07812c9
5d46171ff75a5bb3907b2802afe462dd3b8e15cf
diff --git a/src/StorageCache.cpp b/src/StorageCache.cpp index 9b89023aa..91d4b3657 100644 --- a/src/StorageCache.cpp +++ b/src/StorageCache.cpp @@ -21,7 +21,7 @@ dictType dbStorageCacheType = { StorageCache::StorageCache(IStorage *storage, bool fCache) : m_spstorage(storage) { - if (fCache) + if (!g_p...
[ "src/StorageCache.cpp", "src/config.cpp", "src/server.h" ]
[]
true
Snapchat/KeyDB
639
issue_to_patch
[CRASH] Crash in zrandmember **Reproduce** ``` zadd myset 1 one zrandmember myset -9223372036854775808 ``` **Backtrace** ``` === ASSERTION FAILED === ==> networking.cpp:917 'length >= 0' is not true ------ STACK TRACE ------ Backtrace: keydb-server *:6379(addReplyAggregateLen(client*, long, int)+0...
Rand fixes from redis
Multiple fixes related to rand commands from redis. 1. Integer overflow in count https://github.com/redis/redis/pull/11857 2. fix hincrbyfloat not to create a key if the new value is invalid https://github.com/redis/redis/pull/11149 3. exit rand loop early if client is disconnected https://github.com/redis/redis/pu...
1735e73a353d4a91592ddd6085a0cd6f992d1bb5
70612092a162c3590efbbff8aa74ef2c821fcce6
diff --git a/src/config.cpp b/src/config.cpp index 073e4aca2..866560d35 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -2912,6 +2912,7 @@ standardConfig configs[] = { createLongLongConfig("repl-backlog-size", NULL, MODIFIABLE_CONFIG, 1, LLONG_MAX, g_pserver->repl_backlog_size, 1024*1024, MEMORY_CONFIG, NULL, ...
[ "src/config.cpp", "src/server.h", "src/t_hash.cpp", "src/t_set.cpp", "src/t_zset.cpp", "tests/unit/obuf-limits.tcl", "tests/unit/type/hash.tcl", "tests/unit/type/set.tcl", "tests/unit/type/zset.tcl" ]
[]
diff --git a/tests/unit/obuf-limits.tcl b/tests/unit/obuf-limits.tcl index 77c8e0bec..0cefb9129 100644 --- a/tests/unit/obuf-limits.tcl +++ b/tests/unit/obuf-limits.tcl @@ -182,4 +182,12 @@ start_server {tags {"obuf-limits"} overrides { server-threads 1 }} { assert_equal "v2" [r get k2] assert_equal "...
true
Snapchat/KeyDB
637
issue_to_patch
remove noexcept for alpine
Alpine doesn't compile with noexcept malloc functions.
85afdd0d8ffc5105978baaf2b32678f94193e886
7ceed4689711416c7ca83e119162f54dbc3b34f2
diff --git a/src/Makefile b/src/Makefile index f67f85b5a..0af95870d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -349,7 +349,7 @@ endif # Alpine OS doesn't have support for the execinfo backtrace library we use for debug, so we provide an alternate implementation using libwunwind. OS := $(shell cat /etc/os-release...
[ "src/Makefile", "src/server.h" ]
[ { "comment": "Alpine is just not standards compliant? Maybe your testing on a tool old version?", "path": "src/server.h", "hunk": "@@ -3894,14 +3894,30 @@ void incrementMvccTstamp();\n \n #if __GNUC__ >= 7 && !defined(NO_DEPRECATE_FREE)\n [[deprecated]]\n+#ifdef ALPINE\n+void *calloc(size_t count, siz...
true
Snapchat/KeyDB
629
issue_to_patch
[BUG] used_memory exceeds maxmemory Recently, when I test KeyDb key eviction, I found if maxmemory and repl-backlog-size are included in the profile, finally, the used_memory will be the sum of maxmemory and repl-backlog-size and used_memory will be far more than maxmemory . However, if I do the same test in Redi...
don't count base repl buffer size as overhead
Fixes #601.
f54e3ea3674de2eecfb58c3dbb0894ec6c222331
1284823f345cf03e3020d1dac4983454b8cf3a82
diff --git a/src/evict.cpp b/src/evict.cpp index d9f5338b4..899812f19 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -380,7 +380,7 @@ size_t freeMemoryGetNotCountedMemory(void) { /* also don't count the replication backlog memory * that's where the replication clients get their memory from */ - overh...
[ "src/evict.cpp" ]
[]
true
Snapchat/KeyDB
620
issue_to_patch
fix the swapdb issue
This PR fixed the swapdb issue #626 which can be reproduced as below: start keydb with empty database select 0 --- ok set k1 v1 --- ok swapdb 0 1 --- ok **get k1 --- v1 (expected result should be nil instead of v1)** select 1 --- ok get k1 --- v1 select 0 --- ok get k1 --- nil
858db2645d05ce0e91db91ff4899161bc3a08464
1b1e6cc522ef123c9c54b091ba840b075308e09b
diff --git a/src/db.cpp b/src/db.cpp index 87ed33616..a84fd143f 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1737,6 +1737,9 @@ int dbSwapDatabases(int id1, int id2) { id2 < 0 || id2 >= cserver.dbnum) return C_ERR; if (id1 == id2) return C_OK; std::swap(g_pserver->db[id1], g_pserver->db[id2]); + +...
[ "src/db.cpp" ]
[]
true
Snapchat/KeyDB
622
issue_to_patch
[BUG] unit test failures using BGSave with fork in 6.3.2 **Describe the bug** Regular background save is quite unstable in 6.3.2, including unit test failures **To reproduce** Run unit tests with forkless bgsave disabled ./runtest --config use-fork yes **Expected behavior** Unit tests pass. [BUG] us...
restore fork impl of save to replica sockets
causes crash when use-fork is true as it creates a threaded bgsave instead of a fork as expected. Fixes #567. change default to fork bgsave instead of forkless. Also remove incorrect inclusion of repl_backlog_size from acceptable overhead for maxmemory. Fixes #601.
858db2645d05ce0e91db91ff4899161bc3a08464
f3d36f1645316556f99addcd7371f2474933843a
diff --git a/src/config.cpp b/src/config.cpp index 4d5b77706..073e4aca2 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -2806,7 +2806,7 @@ standardConfig configs[] = { createBoolConfig("appendonly", NULL, MODIFIABLE_CONFIG, g_pserver->aof_enabled, 0, NULL, updateAppendonly), createBoolConfig("cluster-allo...
[ "src/config.cpp", "src/rdb.cpp", "src/server.cpp" ]
[]
true
Snapchat/KeyDB
621
issue_to_patch
Add key eviction number for storage
Current, if we set storage-provider in config file, and even key eviction process happen, the key eviction number is still 0 This PR fix this issue and eviction-key number update during the key evction process as below: # Stats total_connections_received:201 total_commands_processed:3105600 instantaneous_ops_...
858db2645d05ce0e91db91ff4899161bc3a08464
6b243c5506c492b1e78fa67f165ff946ee4b95f7
diff --git a/src/evict.cpp b/src/evict.cpp index 719e7a761..d9f5338b4 100644 --- a/src/evict.cpp +++ b/src/evict.cpp @@ -771,6 +771,7 @@ int performEvictions(bool fPreSnapshot) { if (db->removeCachedValue(bestkey, &deT)) { mem_freed += splazy->addEntry(db->dictUnsafeKeyOnly(), deT)...
[ "src/evict.cpp" ]
[]
true
Snapchat/KeyDB
618
issue_to_patch
add g_expirelock to previously async accesses to expireset
Should fix race condition causing #597 and #600. Also add flash option to create-cluster script for testing.
06380e5fe18b92edd10c37c232d68f78a080a137
79471a23c920d95ce3f6b843d4919eab2a996d17
diff --git a/src/db.cpp b/src/db.cpp index 21d00ad10..87ed33616 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -1931,6 +1931,7 @@ void setExpire(client *c, redisDb *db, robj *key, expireEntry &&e) * is associated with this key (i.e. the key is non volatile) */ expireEntry *redisDbPersistentDataSnapshot::getExpire(const...
[ "src/db.cpp", "src/expire.cpp", "src/object.cpp", "utils/create-cluster/create-cluster" ]
[]
true
Snapchat/KeyDB
606
issue_to_patch
The keyDB instance is called redis in lua Hi, Likely not an oversight, since there are several issues regarding lua scripts that happily refer to the KeyDB instance as redis. But the documentation says otherwise, so i thought i would note it. version: keydb-6.3.2-1.el7.x86_64 OS: CentOS7 Docs: https://docs....
Add KeyDB global variable to lua api
Fixes #594
deaaa992bd629f1b633a73004ba3ee97d23b18e1
5516ed5c21b10ba6664b5454ebd4603f064800fc
diff --git a/src/scripting.cpp b/src/scripting.cpp index 3995eb8f2..f1772cd5c 100644 --- a/src/scripting.cpp +++ b/src/scripting.cpp @@ -1264,6 +1264,9 @@ void scriptingInit(int setup) { /* Finally set the table as 'redis' global var. */ lua_setglobal(lua,"redis"); + /* Set table as 'keydb' global var as...
[ "src/scripting.cpp", "tests/unit/scripting.tcl" ]
[]
diff --git a/tests/unit/scripting.tcl b/tests/unit/scripting.tcl index e8454ef1d..561bcf7e1 100644 --- a/tests/unit/scripting.tcl +++ b/tests/unit/scripting.tcl @@ -43,10 +43,15 @@ start_server {tags {"scripting"}} { r eval {return redis.call('get',KEYS[1])} 1 mykey } {myval} - test { EVAL - keys com...
true
Snapchat/KeyDB
604
issue_to_patch
Perf improvement for module flash load
don't do if statement on every key, use stack object for module notify
715f832b005b425842b810a5971facc8e3d5f468
b0728af6aa595db32d6df8a1af62fba7671a6351
diff --git a/src/db.cpp b/src/db.cpp index 0c6dc5e8a..21d00ad10 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -2607,12 +2607,15 @@ void clusterStorageLoadCallback(const char *rgchkey, size_t cch, void *) slotToKeyUpdateKeyCore(rgchkey, cch, true /*add*/); } -void moduleLoadCallback(const char * rgchKey, size_t cc...
[ "src/db.cpp" ]
[]
true
Snapchat/KeyDB
592
issue_to_patch
[BUG] Self-conflicting log message **Describe the bug** I'm getting a weird message in the logs that I don't know how to interpret: "Unable to connect to MASTER: Success" Did it successfully connect to the other instance or not? **To reproduce** In multi-master mode with a three-node cluster. Not sure if...
make connectWithMaster error message less confusing
Fixes #583
c2077a2fbd856fdee3dfde323369e5e91c2ea860
6f7beb405f9bf6c14d68d96a57119b9fedf00240
diff --git a/src/replication.cpp b/src/replication.cpp index 58a27d1b9..28bb401b1 100644 --- a/src/replication.cpp +++ b/src/replication.cpp @@ -3797,9 +3797,11 @@ int connectWithMaster(redisMaster *mi) { connSetPrivateData(mi->repl_transfer_s, mi); if (connConnect(mi->repl_transfer_s, mi->masterhost, mi->mas...
[ "src/replication.cpp" ]
[]
true
Snapchat/KeyDB
591
issue_to_patch
[BUG] db-s3-object not part of config loading **Describe the bug** The s3 loading doesn't work because the db-s3-object key is not part of the configuration loading in config.cpp. **To reproduce** keydb-server /etc/keydb/redis.conf --db-s3-object s3:/any-bucket/any-object.rdb **Expected behavior** s3 ...
Add config for AWS s3 rdb save/load.
Fixes #584.
c2077a2fbd856fdee3dfde323369e5e91c2ea860
d94ddb0afd3742656332c2875d7a78323cba4703
diff --git a/src/config.cpp b/src/config.cpp index 110e8ab85..4d5b77706 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -35,6 +35,7 @@ #include <fcntl.h> #include <sys/stat.h> +#include <sys/wait.h> #ifdef __linux__ #include <sys/sysinfo.h> #endif @@ -2456,6 +2457,32 @@ static int isValidAOFfilename(char *va...
[ "src/config.cpp", "tests/unit/introspection.tcl" ]
[]
diff --git a/tests/unit/introspection.tcl b/tests/unit/introspection.tcl index 66414c85f..7678a1dd5 100644 --- a/tests/unit/introspection.tcl +++ b/tests/unit/introspection.tcl @@ -162,15 +162,16 @@ start_server {tags {"introspection"}} { aof_rewrite_cpulist time-thread-priority b...
true
Snapchat/KeyDB
589
issue_to_patch
[CRASH] Server with Flash storage crashes after joining the cluster. **Crash report** Paste the complete crash log between the quotes below. Please include a few lines from the log preceding the crash report to provide some context. ``` 38:79:S 17 Feb 2023 23:37:20.847 * Before turning into a replica, using my ...
update slotToKey during fast load
Fixes #585 and fixes #574
c2077a2fbd856fdee3dfde323369e5e91c2ea860
671f9a44e6213ce65ad9718c826635d315df729f
diff --git a/src/SnapshotPayloadParseState.cpp b/src/SnapshotPayloadParseState.cpp index 8ba4b109b..9da163653 100644 --- a/src/SnapshotPayloadParseState.cpp +++ b/src/SnapshotPayloadParseState.cpp @@ -140,7 +140,7 @@ void SnapshotPayloadParseState::flushQueuedKeys() { auto &insertsInFlightTmp = insertsInFlight; //...
[ "src/SnapshotPayloadParseState.cpp", "src/db.cpp", "src/server.h" ]
[]
true
Snapchat/KeyDB
579
issue_to_patch
[BUG] 100k+ open pipe handles causes KeyDB to stop accepting new connections **Describe the bug** KeyDB opens a significant amount of pipes on the system (Ubuntu 20.04 - kernel 5.4.0-113) and is unable to handle any new connections. Existing connections remain stable. Running keydb-cli hangs and keydb-diagnostic-...
Fix rdb fd leak
redisFork also opens child info pipe resulting in opening a new child info pipe when one is already open leaking the first pipe, move the openChildInfoPipe call into launchRdbSaveThread to avoid this. Fixes #453 and #537.
81c6c7902d2d232af03c36a02fc5b6373a08945d
4c03049528be8deba68685de49f59a372ac15d7c
diff --git a/src/childinfo.cpp b/src/childinfo.cpp index ec3e3c133..f1fba91dd 100644 --- a/src/childinfo.cpp +++ b/src/childinfo.cpp @@ -42,6 +42,7 @@ typedef struct { * RDB / AOF saving process from the child to the parent (for instance * the amount of copy on write memory used) */ void openChildInfoPipe(void) { ...
[ "src/childinfo.cpp", "src/rdb.cpp", "src/rdb.h" ]
[]
true
Snapchat/KeyDB
555
issue_to_patch
Upgrade rocksdb to v7.9.2
also remove prefix from jemalloc so rocksdb uses jemalloc
81c6c7902d2d232af03c36a02fc5b6373a08945d
6ef9562fda92ba40921bebabfb903d7dc3d2bb79
diff --git a/deps/Makefile b/deps/Makefile index 190a648a8..28cf4e01d 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -95,7 +95,7 @@ JEMALLOC_LDFLAGS= $(LDFLAGS) jemalloc: .make-prerequisites @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) - cd jemalloc && ./configure --with-version=5.2.1-...
[ "deps/Makefile", "deps/rocksdb", "src/Makefile", "src/debug.cpp", "src/new.cpp", "src/object.cpp", "src/server.h", "src/zmalloc.cpp", "src/zmalloc.h" ]
[]
true
Snapchat/KeyDB
578
issue_to_patch
[CRASH] KeyDB Server crashes while running with configured Flash storage. **Crash report** Paste the complete crash log between the quotes below. Please include a few lines from the log preceding the crash report to provide some context. ``` === KEYDB BUG REPORT START: Cut & paste starting from here === 39:80:...
Fix possible crash in prefetchKeysAsync with flash enabled.
Short circuiting get without snapshot/lock can result in object being modified while being written to client. Fixes #571.
4ac449aee74a5ef4069cfafdd6f3038220cfa9c7
7ae048a44343aba0409b42061cc35d6ecc0ef655
diff --git a/src/db.cpp b/src/db.cpp index e0f4c862c..b959f178e 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -3265,7 +3265,7 @@ int dbnumFromDb(redisDb *db) serverPanic("invalid database pointer"); } -bool redisDbPersistentData::prefetchKeysAsync(client *c, parsed_command &command, bool fExecOK) +void redisDbPer...
[ "src/db.cpp", "src/networking.cpp", "src/server.h" ]
[]
true
Snapchat/KeyDB
575
issue_to_patch
[BUG] keydb server becomes unresponsive **Describe the bug** We are using keyDB with opensips in a replicated cluster configuration. It works fine for a few days after which keydb-cli hangs.( no response or prompt after entering the command at linux CLI). Also remote requests fail to respond. Logging also stops work...
Close child info pipes when RDB save thread is done.
Make sure to close child info pipes when background save thread is done. This avoids leaking two pipes per every background RDB save. Hopefully this fixes #537.
5f5eb0e1b05aaa842c822ec548e1608eeef83080
db2c3cd7e8d16a792b38d672b95e7caf4e5dd3a4
diff --git a/src/server.cpp b/src/server.cpp index 6fd7c2f89..e51b0d30a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2219,6 +2219,7 @@ void checkChildrenDone(void) { g_pserver->rdbThreadVars.fRdbThreadCancel = false; g_pserver->rdbThreadVars.fDone = false; if (exitcode == ...
[ "src/server.cpp" ]
[]
true
Snapchat/KeyDB
570
issue_to_patch
Fix snprintf uses to avoid hardcoded sizes
0bf6a0c37589f3598f99371361da8e9f1de7d826
045cc52c1f0222b2950e2053d4e0504b547535e9
diff --git a/src/anet.c b/src/anet.c index 0b3e462c3..c47853867 100644 --- a/src/anet.c +++ b/src/anet.c @@ -441,7 +441,7 @@ static int _anetTcpServer(char *err, int port, const char *bindaddr, int af, int char _port[6]; /* strlen("65535") */ struct addrinfo hints, *servinfo, *p; - snprintf(_port,6,"%d"...
[ "src/anet.c", "src/aof.cpp", "src/cluster.cpp", "src/config.cpp", "src/dict.cpp", "src/endianconv.c", "src/keydb-diagnostic-tool.cpp", "src/modules/hellotimer.c", "src/networking.cpp", "src/rdb.cpp", "src/redis-cli.c", "src/replication.cpp", "src/server.cpp", "src/tls.cpp", "src/ziplist....
[ { "comment": "This would return 8 - not what you want.", "path": "src/modules/hellotimer.c", "hunk": "@@ -52,7 +52,7 @@ int TimerCommand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int\n for (int j = 0; j < 10; j++) {\n int delay = rand() % 5000;\n char *buf = RedisMo...
true
Snapchat/KeyDB
560
issue_to_patch
[BUG] keydb 6.3.1 appendonly.aof becomes large fast **Describe the bug** Using https://artifacthub.io/packages/helm/enapter/keydb (Master - Master) mode I've noticed that one of the nodes makes `appendonly.aof` very large too quickly. Seems 6.2.2 was OK (but could be other factors affecting). This KeyDB setup is us...
couple AOF fixes
technically possible for child_type == CHILD_TYPE_AOF without active child in feedAppendOnlyFile so check to make sure there is an actual child when writing to buffer. aof rewrite child can hang if another thread was calling cv_wait, just don't cv_notify in child, don't care about other threads in child process anyw...
a1978ce04c6523871f4a20a2faa739d27735da63
9f4c6e6f153b962c0c5615d7cca8786b93f1e87e
diff --git a/src/ae.cpp b/src/ae.cpp index 9d8c945d5..99093daa8 100644 --- a/src/ae.cpp +++ b/src/ae.cpp @@ -859,6 +859,11 @@ void aeReleaseForkLock() g_forkLock.downgradeWrite(); } +void aeForkLockInChild() +{ + g_forkLock.setNotify(false); +} + int aeThreadOwnsLock() { return fOwnLockOverride || g_l...
[ "src/ae.cpp", "src/ae.h", "src/aof.cpp", "src/rdb.cpp", "src/readwritelock.h", "src/server.cpp" ]
[]
true
SoftEtherVPN/SoftEtherVPN
2,278
issue_to_patch
Add CI for LibreSSL and update some API
Currently, building with LibreSSL results in an error: ``` [ 19%] Building C object src/Mayaqua/3rdparty/cpu_features/CMakeFiles/cpu_features.dir/src/impl_x86_windows.c.o [ 20%] Linking C static library libcpu_features.a [ 20%] Built target cpu_features [ 21%] Building C object src/Mayaqua/CMakeFiles/mayaqua.dir/C...
2f67b3bd69170835a262c8ec970cb8ae46db8fed
bfcb6788a79c4ad479dfb569e716311924228692
diff --git a/.github/workflows/libressl.yml b/.github/workflows/libressl.yml new file mode 100644 index 000000000..3ed274138 --- /dev/null +++ b/.github/workflows/libressl.yml @@ -0,0 +1,31 @@ +name: LibreSSL + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + libressl: + runs-on: ubuntu-latest...
[ ".github/workflows/libressl.yml", "src/Mayaqua/Encrypt.h", "src/Mayaqua/Network.c" ]
[]
true
SoftEtherVPN/SoftEtherVPN
2,217
issue_to_patch
Fix preserve errno in SIGCHLD signal handler
The Sanitizer detected `signal handler spoils errno`: ``` WARNING: ThreadSanitizer: signal handler spoils errno (pid=5147) Signal 17 handler invoked at: #0 UnixSigChldHandler /home/runner/work/SoftEtherVPN/SoftEtherVPN/src/Mayaqua/Unix.c:2142 (libmayaqua.so+0x266d2d) (BuildId: 7647956240b597b45293d534cf6ea5b7...
e722f78608ed9fe75590adf5d0ee54499058d284
88af7986b4b143dba48fdb9c753bebc87ba5817f
diff --git a/src/Mayaqua/Unix.c b/src/Mayaqua/Unix.c index 0c3778df6..84da93266 100644 --- a/src/Mayaqua/Unix.c +++ b/src/Mayaqua/Unix.c @@ -2140,9 +2140,13 @@ void UnixMemoryFree(void *addr) // SIGCHLD handler void UnixSigChldHandler(int sig) { + int old_errno = errno; + // Recall the zombie processes whi...
[ "src/Mayaqua/Unix.c" ]
[]
true
SoftEtherVPN/SoftEtherVPN
2,223
issue_to_patch
Fix memory leak in LoadLangList()
This leak is only triggered when `hamcore.se2` is corrupted or problematic, therefore, it is unlikely to affect most users in normal scenarios. Changes proposed in this pull request: - Fix memory leak in LoadLangList()
68e9f0b5939f7fe3546d34109eb5be16d74a80d1
6ef941db21ea0ca1a13499ef984d4288f5e8181e
diff --git a/src/Mayaqua/Table.c b/src/Mayaqua/Table.c index b2f55ecf5..961cf15c4 100644 --- a/src/Mayaqua/Table.c +++ b/src/Mayaqua/Table.c @@ -470,6 +470,7 @@ LIST *LoadLangList() b = ReadDump(filename); if (b == NULL) { + FreeLangList(o); return NULL; }
[ "src/Mayaqua/Table.c" ]
[]
true
SoftEtherVPN/SoftEtherVPN
2,220
issue_to_patch
Fix race condition in thread counter
The Sanitizer detected data race: ``` WARNING: ThreadSanitizer: data race (pid=5147) Read of size 4 at 0x7f3ac0ab9b44 by thread T20: #0 CleanupThread /home/runner/work/SoftEtherVPN/SoftEtherVPN/src/Mayaqua/Kernel.c:1058 (libmayaqua.so+0x1970f2) (BuildId: 7647956240b597b45293d534cf6ea5b7ed2f8c4c) #1 Relea...
68e9f0b5939f7fe3546d34109eb5be16d74a80d1
d7d3ec8cacb92803360f4d57db162a5aca2cdbb6
diff --git a/src/Mayaqua/Kernel.c b/src/Mayaqua/Kernel.c index ec4621f7a..2fa371854 100644 --- a/src/Mayaqua/Kernel.c +++ b/src/Mayaqua/Kernel.c @@ -63,7 +63,7 @@ static int ydays[] = 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; -static UINT current_num_thread = 0; +static COUNTER *current_num...
[ "src/Mayaqua/Kernel.c" ]
[]
true