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

Upgrade from BoltDB to bbolt #8442

Closed
jsosulska opened this issue Aug 5, 2020 · 4 comments
Closed

Upgrade from BoltDB to bbolt #8442

jsosulska opened this issue Aug 5, 2020 · 4 comments
Assignees
Labels
theme/internals Serf, Raft, SWIM, Lifeguard, Anti-Entropy, locking topics type/enhancement Proposed improvement or new feature type/umbrella-☂️ Makes issue the "source of truth" for multiple requests relating to the same topic

Comments

@jsosulska
Copy link
Contributor

Feature Description

Per BoltDB's Repo:

Bolt is in a stable state and has years of successful production use. As such, I feel that leaving it in its current state is the most prudent course of action.
If you are interested in using a more featureful version of Bolt, I suggest that you look at the CoreOS fork called bbolt.

Use Case(s)

#7471 and #3771 (comment) illustrate the need for a newer version of Bolt.

@jsosulska jsosulska added type/enhancement Proposed improvement or new feature type/umbrella-☂️ Makes issue the "source of truth" for multiple requests relating to the same topic theme/internals Serf, Raft, SWIM, Lifeguard, Anti-Entropy, locking topics labels Aug 5, 2020
@jsosulska
Copy link
Contributor Author

Consul uses bbolt via the hasicorp/raft-boltdb package. This package then depends on the original BoltDB's Repo at v.1.3.1.

History:
From there, it was forked to coreos/bbolt @1.3.1, with changes. Coreos continues to commit for 7 tags, before turning it over to etcd-io for ownership. The current version is 1.3.5. A summary of all the changes From fork to latest.

Findings:

  • Overall the dependency would be easy/medium to implement in the library, but would need to be tested.
  • Not all version jumps outline on the history are needed. As a control - cutting over directly to 1.3.2 would be sufficient to suss out initial compatibility impact and avoid multiple package renames.
  • hasicorp/raft is a cross dependency.

Considerations:

  • Nomad also has a dependency on this library, and as such, blast radius of an upgrade like this should be discussed.
  • Vault is not affected as that product does not use the raft-boltdb library.

Bolt

@jsosulska
Copy link
Contributor Author

Working with Sarah Notes:

  • Main concern - upgrade raft-boltdb

raft-boltdb (before upgrade): 2.234s, 2.21s, 1.7s
raft-boltdb (after upgrade): 2.174s, 1.7s, 1.7s

First hashicorp/raft-boltdb needs to import the new dependency, and release a new version.
Then hashicorp/raft needs to import the new dependency, and release a new version.
Lastly, consul needs to import hashicorp/raft when it is ready to update.

@Asara
Copy link

Asara commented Aug 10, 2021

Looking forward to this as it is the only thing blocking building consul for riscv64 for me right now without adding:

package bolt
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
const maxAllocSize = 0x7FFFFFFF
var brokenUnaligned = false

to pkg/mod/github.com/boltdb/bolt/bolt_riscv64.go manually.

@blake
Copy link
Member

blake commented Dec 3, 2021

Closing this issue as the work was recently completed in PR #11720.

@blake blake closed this as completed Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/internals Serf, Raft, SWIM, Lifeguard, Anti-Entropy, locking topics type/enhancement Proposed improvement or new feature type/umbrella-☂️ Makes issue the "source of truth" for multiple requests relating to the same topic
Projects
None yet
Development

No branches or pull requests

4 participants