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

core: swap bolt impl and enable configuring raft freelist sync behavior #12107

Merged
merged 6 commits into from
Feb 24, 2022

Conversation

shoenig
Copy link
Member

@shoenig shoenig commented Feb 23, 2022

This PR swaps the underlying BoltDB implementation from boltdb/bolt
to go.etc.io/bbolt. Applies to both server raft store and client data store.

In addition, the Server has a new configuration option for disabling
NoFreelistSync on the underlying database.

Freelist option: https://github.com/etcd-io/bbolt/blob/master/db.go#L81
Consul equivelent PR: hashicorp/consul#11720

Closes #11775

@shoenig shoenig changed the title core: enable configuring raft freelist sync behavior core: swap bolt impl and enable configuring raft freelist sync behavior Feb 23, 2022
@vercel vercel bot temporarily deployed to Preview – nomad February 23, 2022 20:16 Inactive
This PR swaps the underlying BoltDB implementation from boltdb/bolt
to go.etc.io/bbolt.

In addition, the Server has a new configuration option for disabling
NoFreelistSync on the underlying database.

Freelist option: https://github.com/etcd-io/bbolt/blob/master/db.go#L81
Consul equivelent PR: hashicorp/consul#11720
This PR modifies the server and client agents to use `go.etc.io/bbolt` as the
implementation for their state stores.
Comment on lines 57 to 58
underlying implementation provided by `go.etcd.io/bbolt`. Downgrading to a previous
version of the server after upgrading it to Nomad 1.3 is not supported.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should be a little more prescriptive to help folks out with our No Going Back upgrades:

Like any Nomad upgrade it is recommended that you take a snapshot of your database prior to upgrading to use in case you need to downgrade.

Heavily inspired by https://www.consul.io/docs/upgrading/upgrade-specific#raft-storage-changes but removed the if you expect that you will need to downgrade. because who ever expects they'll need to downgrade? 😬

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIP Original Bolt. Stablest abandonware I've ever used.

Left some ideas on the docs but nothing to block on.

@shoenig
Copy link
Member Author

shoenig commented Feb 24, 2022

RIP Original Bolt. Stablest abandonware I've ever used.

I was at Gophercon 2014 when bolt was announced. I remember thinking, "nobody would use this..."

@shoenig shoenig merged commit 5b65c97 into main Feb 24, 2022
@shoenig shoenig deleted the use-bbolt branch February 24, 2022 14:25
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade from BoltDB to bbolt
3 participants