hashicorp / raft-boltdb

Raft backend implementation using BoltDB
Mozilla Public License 2.0
653 stars 112 forks source link

Incompatibility with RISC-V architecture #27

Open ileanadumitrescu95 opened 2 years ago

ileanadumitrescu95 commented 2 years ago

boltdb does not have the compatibility with RISC-V that bbolt does. raft-boltdb and any other go package that depends on boltdb or raft-boltdb (like consul and nomad) will not build on the RISC-V architecture. v2 of raft-boltdb was meant to use bbolt instead of boltdb, but it still depends on boltdb which causes the build to fail. Can raft-boltdb be modified to have no dependency on boltdb? Debian build log using latest release 2.2.0 is attached. buildlog_raft-boltdb.txt

stephen-fox commented 2 years ago

Looking at the code, it appears v2 of this library depends on boltdb to support migrating databases from v1 to v2.

Perhaps the simplest solution is to move the migration function and unit test(s) into source files that are ignored for unsupported platforms (like RISC-V). Assuming that is possible, such a change would preserve API compatibility, and would not introduce a need for a separate Go module.