-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rheakv support scan in reverse #422
Conversation
Hi @shibd, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.
Motivation:> It looks that rheakv doesn't support scan in reverse order, we should support it. # 340 ### Modification: The entire code changes according to the relevant points of the scan interface, adding the reverseScan interface, according to the reverse scan Meaning realized. ### Result: 1. The
|
...t-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultRheaKVStore.java
Outdated
Show resolved
Hide resolved
提交了一版代码,请帮忙review。 CI报错,请问这个问题怎么解决 @killme2008 |
https://github.com/sofastack/sofa-jraft/blob/master/CONTRIBUTING.md we provided a code formatter file, it will formatting automatically your project when during process of building. 代码格式有问题,本地执行一下 |
@shibd Ok, i will look into it. |
收到,谢谢,已经格式化。有个测试没过,我在本地是可以通过的。
|
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/DefaultRegionKVService.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/KVCommandProcessor.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/RegionKVService.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/StoreEngineHelper.java
Outdated
Show resolved
Hide resolved
...t-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultRheaKVStore.java
Outdated
Show resolved
Hide resolved
...t-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultRheaKVStore.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/cmd/store/BaseRequest.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/KVOperation.java
Outdated
Show resolved
Hide resolved
...rheakv-core/src/test/java/com/alipay/sofa/jraft/rhea/storage/memorydb/MemoryKVStoreTest.java
Outdated
Show resolved
Hide resolved
...v/rheakv-core/src/test/java/com/alipay/sofa/jraft/rhea/storage/rocksdb/RocksKVStoreTest.java
Outdated
Show resolved
Hide resolved
@shibd 感谢贡献,整体代码质量比较高,提了几个小意见可以看下 |
谢谢,review的代码已经全部修复,合并了commit log,请再帮忙看一下有没有问题。 |
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/RheaKVStore.java
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/MemoryRawKVStore.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RaftRawKVStore.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RaftRawKVStore.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RocksRawKVStore.java
Outdated
Show resolved
Hide resolved
@shibd 上一次 cr 有一些遗漏不好意思,麻烦再看下 |
好的,谢谢,是我的问题,我现在改。 |
@fengjiachun 您好,修复了上面提的问题,请麻烦再review一下。 |
@shibd CLA 签一下? |
这个怎么签署呢,不好意思第一次参与开源。 |
点击不了, |
是我们这边出了点问题,稍等,相关人在处理中 |
@shibd 再看一下,应该可以签了 |
@fengjiachun 这里显示签署过了,不过看还有提示要签署 |
我们的问题,ok 了已经 |
@killme2008 你这边还有其他意见吗 |
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/KVCommandProcessor.java
Outdated
Show resolved
Hide resolved
...t-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/client/DefaultRheaKVStore.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/KVOperation.java
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RocksRawKVStore.java
Outdated
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/MemoryRawKVStore.java
Show resolved
Hide resolved
@shibd 提了些意见,请再看下 |
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/MemoryRawKVStore.java
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/KVOperation.java
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/KVOperation.java
Show resolved
Hide resolved
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RocksRawKVStore.java
Outdated
Show resolved
Hide resolved
@fengjiachun @killme2008 对上面提到的CR做了一些调整,请看一下 |
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/KVOperation.java
Outdated
Show resolved
Hide resolved
没有其他问题了,测试有没有覆盖 scan 为空的情况,建议也覆盖下 |
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/DefaultRegionKVService.java
Show resolved
Hide resolved
@killme2008 谢谢,CR已经修改,合并了commit log。 |
@fengjiachun 您好,看一下还有没有问题。 |
@shibd Congratulations on your first PR! Thanks a lot. |
@shibd 感谢 |
@fengjiachun @killme2008 非常感谢两位大佬细心的CR,如果还有具体issue,可以直接分配给我。我会持续学习jraft实现,希望可以为jraft建设出一份力。 |
@shibd 感谢代码质量很高的 pr,这是我的邮箱 jiachun.fjc@alibaba-inc.com ,可以钉钉或是微信交流,方便的话,可以把钉钉/微信发到我的邮箱,我来加你 |
Motivation:
#340
Modification:
整个代码改动按照scan接口的相关点,新增reverseScan接口,按照reverse scan的含义实现。
Result:
RheaKVStore
接口新增reverseScan
方法并实现DefaultRheaKVStore
。相关测试也补充完毕。RawKVStore
接口新增reverseScan
方法,并实现了内存版本MemoryRawKVStore
和RocksRawKVStore
相关测试也补充完毕。ReverseScanRequest
并在状态机和方法内实现了相关修改,批量操作也按原本实现做了实现。