sofastack / sofa-jraft

A production-grade java implementation of RAFT consensus algorithm.
https://www.sofastack.tech/projects/sofa-jraft/
Apache License 2.0
3.57k stars 1.14k forks source link

Get sequence again in RheaKV by bGetSequence #128

Closed masaimu closed 5 years ago

masaimu commented 5 years ago

Your question

How can i get the same sequence again when i use com.alipay.sofa.jraft.rhea.client.RheaKVStore#bGetSequence(java.lang.String, int) to get sequence.

Your scenes

Each bGetSequence method call will lead to sequence increase by step, so other client or thread cannot get the current sequence. In my scenes, i have to store this sequence in addition.

Your advice

If bGetSequence method allows step parameter to be zero, this question will be solved simply.

Environment

fengjiachun commented 5 years ago

This feature will be supported in v1.2.6 at the latest.