jackjoesh
jackjoesh
Can BigDecimalSerializer support round_up or round_down features? Or is there any spi that can extend this kind of features? Thank you
**背景现象:** 这个问题和我之前提的那个issue([https://github.com/sofastack/sofa-jraft/issues/830])是类似的,我们新启的follower需要追的log比较多,会达到亿级别。 append log有可能会堵塞住jraft log disruptor, 从而造成append log请求超时。 最后在如下代码的判断里,因为append log请求超时超过了ElectionTimeoutMs,则add peer task会失败,replicator会停止,follower永远都无法加入集群了。(ElectionTimeoutMs我们使用的是默认的1000ms) https://github.com/sofastack/sofa-jraft/blob/1d57d082d4fe50cc11f63cde7134efe026dbdbd8/jraft-core/src/main/java/com/alipay/sofa/jraft/core/NodeImpl.java#L2174 **如何解决这个问题** 关于限流 之前有提过通过限流leader append log的并发量,避免follower在追进度时出现堵塞情况,从而影响heartbeat或append log。 我这里发现如下的参数是比较影响并发量的 private int maxEntriesSize = 1024; //单批次日志数量 private int maxReplicatorInflightMsgs =...
setErrorAndRollback的ntail参数从功能上看是回滚lastappliedindex 但是一旦setErrorAndRollback后,整个服务也是stop掉的。 当修复节点代码重启后有两种恢复方式: 1 如果有snapshot,加载snapshot,然后从snapshot的index+1开始apply log 2 如果没有snapshot,从index=0开始apply log 这两种方式本质都是数据重放,那setErrorAndRollback在内存里回滚的ntail是不是没有什么意义。无论如何,节点重启后,也不会重复apply的? 我很想理解ntail参数的实际作用,这个对服务使用混沌测试非常有意义,麻烦能解释下缘由,谢谢!
### Describe the bug 如果follower业务状态机队列满了,leader向follower发heartbeat请求会超时失败,从而follower触发onstopfollowing 基于v1.3.9.10.bugfix_2版本 NodeImpl第1963行开始的this.ballotBox.setLastCommittedIndex(Math.min(request.getCommittedIndex(), prevLogIndex));有这个问题: if (entriesCount == 0) { // heartbeat or probe request final AppendEntriesResponse.Builder respBuilder = AppendEntriesResponse.newBuilder() // .setSuccess(true) // .setTerm(this.currTerm) // .setLastLogIndex(this.logManager.getLastLogIndex()); doUnlock...
LogManagerImpl里的logsInMemory是否有内存泄露风险? 重现原因: 1 如果follower重启后,需要append log的非常多,比如几亿条(某些原因leader长时间没有snapshot),那logsInMemory里就会添加很多到内存里 2 而在NodeImpl的handleAppendEntriesRequest逻辑里,是用JRaft-LogManager-Disruptor队列的空间大小来判断是否足够接收log的,不会去判断logsInMemory内存空间是否足够 3 logsInMemory的清理需要等到状态机apply或者打snapshot的时候,相当于收到log到apply这段时间内,内存是无法清理的,且apply速度一般不会那么快。 实测下来,大概logsInMemory只需要缓存36万个segment,内存占用就可以突破13GB,会内存泄露。内存dump如下:   **out of memory日志:** 2022-06-05 16:04:52 [JRaft-LogManager-Disruptor-0] ERROR LogExceptionHandler:64 - Handle LogManagerImpl disruptor event error, event is com.alipay.sofa.jraft.storage.impl.LogManagerImpl$StableClosureEvent@7d4d317b java.lang.OutOfMemoryError:...
If the leader needs to be really ready, it needs to apply all business data successfully after the election. During this period of time, the leader cannot actually provide services....
### Search before asking - [X] I had searched in the [issues](https://github.com/datafuselabs/databend/issues) and found no similar issues. ### Version Version: v1.2.174-nightly ### What's Wrong? databend should sustain case-sensitive for query...
### Search before asking - [X] I had searched in the [issues](https://github.com/datafuselabs/databend/issues) and found no similar issues. ### Version v1.2.307 ### What's Wrong? timestamp sub-query filter condition doesn't push down...
Do we support parallel read by threads? I can't see the parallel_read_threads in the settings of new version. And I have found this issue: https://github.com/datafuselabs/databend/pull/4480 How did we implemented parallel...