Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8f39700

Browse files
kvapkelvich
authored andcommitted
Fix conflicting raftable header names. Remove raftable.o from Makefile.
1 parent 90ef453 commit 8f39700

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MODULE_big = multimaster
2-
OBJS = multimaster.o raftable.o arbiter.o bytebuf.o bgwpool.o pglogical_output.o pglogical_proto.o pglogical_receiver.o pglogical_apply.o pglogical_hooks.o pglogical_config.o ddd.o bkb.o
2+
OBJS = multimaster.o arbiter.o bytebuf.o bgwpool.o pglogical_output.o pglogical_proto.o pglogical_receiver.o pglogical_apply.o pglogical_hooks.o pglogical_config.o ddd.o bkb.o
33

44
override CPPFLAGS += -I../raftable
55

multimaster.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
#include "catalog/indexing.h"
5656
#include "pglogical_output/hooks.h"
5757

58-
#include "raftable.h"
5958
#include "multimaster.h"
6059
#include "ddd.h"
60+
#include "raftable_wrapper.h"
6161
#include "raftable.h"
6262

6363
typedef struct {
@@ -2370,3 +2370,24 @@ MtmDetectGlobalDeadLock(PGPROC* proc)
23702370
}
23712371
return hasDeadlock;
23722372
}
2373+
2374+
void* RaftableGet(char const* key, int* size, RaftableTimestamp* ts, bool nowait)
2375+
{
2376+
size_t s;
2377+
char *value;
2378+
Assert(ts == NULL); /* not implemented */
2379+
value = raftable_get(key, &s);
2380+
*size = s;
2381+
return value;
2382+
}
2383+
2384+
void RaftableSet(char const* key, void const* value, int size, bool nowait)
2385+
{
2386+
raftable_set(key, value, size, nowait ? 0 : -1);
2387+
}
2388+
2389+
bool RaftableCAS(char const* key, char const* value, bool nowait)
2390+
{
2391+
Assert(false); /* not implemented */
2392+
return false;
2393+
}

raftable.h renamed to raftable_wrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __RAFTABLE_H__
2-
#define __RAFTABLE_H__
1+
#ifndef __RAFTABLE_WRAPPER_H__
2+
#define __RAFTABLE_WRAPPER_H__
33

44
typedef struct RaftableTimestamp {
55
time_t time; /* local time at master */

0 commit comments

Comments
 (0)