Skip to content
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

[ISSUE #289] Support Register-Model server based on DLedger #288

Merged
merged 10 commits into from
May 29, 2023
Prev Previous commit
Next Next commit
fix(jepsen): fix apply empty log
1. fix apply empty log

Closes #286
  • Loading branch information
TheR1sing3un committed May 23, 2023
commit 3a34a5dd0e594ab9955693b5e2e8a9548a687d6e
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class RegisterStateMachine implements StateMachine {
public void onApply(CommittedEntryIterator iter) {
while (iter.hasNext()) {
final DLedgerEntry entry = iter.next();
if (entry != null && entry.getBody() != null) {
if (entry != null && entry.getBody() != null && entry.getBody().length == 8) {
byte[] bytes = entry.getBody();
int key = BytesUtil.bytesToInt(bytes, 0);
int value = BytesUtil.bytesToInt(bytes, 4);
Expand Down