cowsql / raft

Asynchronous C implementation of the Raft consensus protocol
https://raft.readthedocs.io
Other
53 stars 6 forks source link

backporting raft_register_state_cb and making compatible with canonical/raft v0.18.1 #178

Open listout opened 9 months ago

listout commented 9 months ago

https://github.com/canonical/raft/commit/65351619b03844b5d7f8fe6cbb12ebb70cfa8d9a adds a callback function raft_register_state_cb. In gentoo we ship dqlite which is dependent on cowsql/raft and it's failing with build error

rc/server.c: error: implicit declaration of function raft_register_state_cb

Refer: https://bugs.gentoo.org/925012

freeekanayaka commented 9 months ago

TL;DR: starting from the next dqlite release this won't a be a problem anymore since the whole canonical/raftsource code will be moved directly inside the canonical/dqlite repository, and built together in a single shared library.

See this comment https://github.com/canonical/dqlite/issues/549#issuecomment-1951370616 and this PR https://github.com/canonical/dqlite/pull/568.

Note that dqlite 1.16.0 works fine with canonical/cowsql. The only non-compatible release is dqlite 1.16.2. Would it be fine for you/gentoo to just to wait for dqlite 1.16.3 and stick with 1.16.0 fow now? It doesn't make much sense to fix this issue which is effectively going away soon.

juippis commented 9 months ago

That sounds good, will do that.

freeekanayaka commented 9 months ago

That sounds good, will do that.

https://github.com/canonical/dqlite/releases/tag/v1.16.3

you can now build dqlite with --enable-build-raft.