OpenAtomFoundation / pikiwidb

a high-performance, large-capacity, multi-tenant, data-persistent, strong data consistency based on raft, Redis-compatible elastic KV data storage system based on RocksDB
BSD 3-Clause "New" or "Revised" License
194 stars 63 forks source link

When node has not initialized in raft mode #307

Closed longfar-ncy closed 3 months ago

longfar-ncy commented 3 months ago

Is this a regression?

Yes

Description

在 raft 模式下,应当首先初始化节点再进行读写操作。在开发时使用 assert 保证读写命令执行时,node 一定被初始化了。

现在需要增加对此的错误处理,在raft模式下,如果在节点初始化之前进行读写,应当向 client 返回错误信息,而不是触发 assert 崩溃。

Please provide a link to a minimal reproduction of the bug

No response

Screenshots or videos

images

Please provide the version you discovered this bug in (check about page for version information)

No response

Anything else?

No response

longfar-ncy commented 3 months ago

@chanfun