Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- name: Test
env:
CC: ${{ matrix.compiler }}
LIBDQLITE_TRACE: 1
ASAN_OPTIONS: fast_unwind_on_malloc=0
run: |
./test/raft/lib/fs.sh setup
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/latest-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Build dqlite
run: |
autoreconf -i
./configure --enable-debug --enable-sanitize --enable-build-raft --enable-build-sqlite
./configure CFLAGS="-march=x86-64-v3" --enable-debug --enable-sanitize --enable-build-raft --enable-build-sqlite
Comment thread
marco6 marked this conversation as resolved.
make -j4 unit-test integration-test \
raft-core-fuzzy-test \
raft-core-integration-test \
Expand All @@ -69,5 +69,4 @@ jobs:

- name: Test
run: |
export LIBDQLITE_TRACE=1
make check || (cat ./test-suite.log && false)
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ libraft_la_SOURCES = \
src/raft/entry.c \
src/raft/err.c \
src/raft/fixture.c \
src/raft/flags.c \
src/raft/heap.c \
src/raft/log.c \
src/raft/membership.c \
Expand Down
8 changes: 2 additions & 6 deletions src/raft/byte.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@
#include <string.h>
#include <unistd.h>

#if defined(__cplusplus)
#define BYTE__INLINE inline
#else
#if defined(__clang__)
#define BYTE__INLINE static inline __attribute__((unused))
# define BYTE__INLINE static inline __attribute__((unused))
#else
#define BYTE__INLINE static inline
#endif
# define BYTE__INLINE static inline
#endif

/* Compile-time endianess detection (best effort). */
Expand Down
16 changes: 0 additions & 16 deletions src/raft/flags.c

This file was deleted.

15 changes: 12 additions & 3 deletions src/raft/flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,23 @@

/* Adds the flags @flags to @in and returns the new flags. Multiple flags should
* be combined using the `|` operator. */
raft_flags flagsSet(raft_flags in, raft_flags flags);
static inline raft_flags flagsSet(raft_flags in, raft_flags flags)
{
return in | flags;
}

/* Clears the flags @flags from @in and returns the new flags. Multiple flags
* should be combined using the `|` operator. */
raft_flags flagsClear(raft_flags in, raft_flags flags);
static inline raft_flags flagsClear(raft_flags in, raft_flags flags)
{
return in & (~flags);
}

/* Returns `true` if the single flag @flag is set in @in, otherwise returns
* `false`. */
bool flagsIsSet(raft_flags in, raft_flags flag);
static inline bool flagsIsSet(raft_flags in, raft_flags flag)
{
return (bool)(in & flag);
}

#endif /* FLAGS_H */
4 changes: 2 additions & 2 deletions src/raft/progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ void progressMarkRecentRecv(struct raft *r, const unsigned i)
r->leader_state.progress[i].recent_recv = true;
}

inline void progressSetFeatures(struct raft *r,
void progressSetFeatures(struct raft *r,
const unsigned i,
raft_flags features)
{
r->leader_state.progress[i].features = features;
}

inline raft_flags progressGetFeatures(struct raft *r, const unsigned i)
raft_flags progressGetFeatures(struct raft *r, const unsigned i)
{
return r->leader_state.progress[i].features;
}
Expand Down
2 changes: 1 addition & 1 deletion src/raft/replication.c
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ void replicationQuorum(struct raft *r, const raft_index index)
return;
}

inline bool replicationInstallSnapshotBusy(struct raft *r)
bool replicationInstallSnapshotBusy(struct raft *r)
{
return r->last_stored == 0 && r->snapshot.put.data != NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion src/registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ struct db *registry__get(const struct registry *r, const char *filename);
/**
* Returns the number of databases in the registry.
*/
inline size_t registry__size(const struct registry *r) { return r->size; }
static inline size_t registry__size(const struct registry *r) { return r->size; }

#endif /* REGISTRY_H_*/