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

updated dependencies, fixed race condition #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bergos
Copy link

@bergos bergos commented Nov 20, 2020

This PR fixes some issues and updates all dependencies to the latest major versions.

Fixes and updates:

  • The command method of the Raft class tried to use a non existing function to forward an error for the case that it was called without being the leader. This was replaced by a standard throw with the address of the leader attached to the error object.
  • The latest version of levelup no longer supports string values for keyEncoding. Very simple helper functions are used to convert the integer key values to hex strings.
  • The commandAck method of the Raft class contained a race condition problem. The problem mainly shows up with a bigger number of nodes. A promise queue is used to solve the problem.
  • The latest version of mkdirp uses an Promise API. The util.promisify wrapper was therefore removed.

@kakserpom
Copy link

@bergos, you are amazing! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants