Comments (9)
/assignme
from openraft.
get~ thanks XD
from openraft.
👋 Thanks for opening this issue!
Get help or engage by:
/help
: to print help messages./assignme
: to assign this issue to you.
from openraft.
Hi, I have a question, the old last_id_in_log
method will return a LogId
,not an Option<LogId>
, but the new one we should return an Option
. I found I need to call unwrap_or_default()
every time I want to get the last_log_id
. Shall we replace the return type of get_log_state
method to Result<(Option<LogId>, LogId), StorageError>
? @drmingdrmer
from openraft.
There are some corner cases with using LogId for last_log_id.
E.g., when there is no log at all, using LogId
, it returns (0,0)
, which will confuse the caller.
unwrap()
everywhere, for now, is not a big deal. As soon as the main branch merges #49 , it will work smoothly altogether.
from openraft.
@YangKian hi, this issue may have a strong connection with #49 , it seems difficult to finish each one alone, so do you want to combine these two issues into one pr to fix them or any other advice?
from openraft.
@Veeupup Sorry for the late reply. Is it blocking something on your side? It seems to be working fine on my side, at least the tests passed after the changes were made, if I'm not missing something. I'll fill the pr later, and if my side is blocking your progress, it's ok to leave it to me XD
from openraft.
@YangKian yeah, u can finish it later. from my side, it will make nonsense if last_id_in_log()
and some function return LogId
ranther than Option<LogId>
.
from openraft.
@Veeupup Ok, let me handle it~
from openraft.
Related Issues (20)
- Add a command to let user trigger log purge with `Raft::purge_log()` HOT 1
- Tracking issue for refactoring snapshot API HOT 1
- Cannot implement `RaftLogStorage` and `RaftStateMachine` in `main` codeline HOT 2
- v2 API: Missing `Send` bound for `RaftStateMachine::apply()` HOT 2
- Compiling `openraft` with v2 API enabled results in some warnings HOT 3
- Feature: Allow creating `!Send` storage, log and network components HOT 3
- Manually impl `Clone` for `Raft` structure instead of using `#[derive(Clone)]` HOT 2
- Add type param `Time` to `UTime` HOT 2
- Consider allowing to change node address in one step instead of removing-then-adding HOT 1
- Tracking issue for rkyv support HOT 1
- Provide better support for transient state machine implementation HOT 1
- InternalServerState is too big, move Leading into Box HOT 1
- Upon startup, a node that is leader should restore local log progress and re-apply log entries if it is single node cluster HOT 1
- Consider relaxing NodeId: Default bound HOT 4
- debug_assert causes leader to panic HOT 7
- Update examples to reflect the latest openraft API HOT 1
- an issue from async-raft HOT 4
- Do not report snapshot.last_log_id to metrics until snapshot is finished building/installing HOT 1
- Web APIs in example should follow RESTful style HOT 3
- election won't work if wrong NodeId is passed when adding node to cluster HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openraft.