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

Consul in latest versions defaults to experimental WAL backend, despite docs saying boltdb is default #21992

Open
berkeli opened this issue Dec 10, 2024 · 0 comments

Comments

@berkeli
Copy link

berkeli commented Dec 10, 2024

Overview of the Issue

In consul 1.20.1 (maybe in other versions as well, we just upgraded from 1.14.8), consul defaults to experimental WAL backend even though docs say that it is experimental and default is boltdb.

Reproduction Steps

Create a server with default config for raft logstore, check data folder. It should have boltdb file but has wal file.

We can also see in code logic why that is

consul/agent/consul/server.go

Lines 1030 to 1044 in beef7a7

if s.config.LogStoreConfig.Backend == LogStoreBackendDefault && !boltFileExists {
s.config.LogStoreConfig.Backend = LogStoreBackendWAL
if !s.config.LogStoreConfig.Verification.Enabled {
s.config.LogStoreConfig.Verification.Enabled = true
s.config.LogStoreConfig.Verification.Interval = 1 * time.Minute
}
if err = initWAL(); err != nil {
return err
}
} else if s.config.LogStoreConfig.Backend == LogStoreBackendWAL && !boltFileExists {
if err = initWAL(); err != nil {
return err
}
} else {
if s.config.LogStoreConfig.Backend == LogStoreBackendWAL {

if default & boltdb file doesn't exist => WAL
if WAL & boltdb file doesn't exist => WAL
else use BoltDB

excerpt from the docs:

backend Specifies which storage engine to use to persist logs. Valid options are boltdb or wal. Default is boltdb. The wal option specifies an experimental backend that should be used with caution. Refer to Experimental WAL LogStore backend for more information.

So it's a bit confusing when WAL became the default and if it is still experimental

Consul info for both Client and Server

we use a forked consul version, but this issue exists on non-forked version as described above.

Operating system and Environment details

Linux

Log Fragments

n/a

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

No branches or pull requests

1 participant