Commit 935e2a52 authored by Matthieu Dorier's avatar Matthieu Dorier

removed fake kv dbs

parent f7c4c123
......@@ -66,8 +66,7 @@ src_server_libmobject_server_la_SOURCES = \
src/server/core/core-write-op.cpp \
src/server/core/core-read-op.cpp \
src/server/printer/print-write-op.c \
src/server/printer/print-read-op.c \
src/server/core/fake-kv.cpp
src/server/printer/print-read-op.c
src_server_libmobject_server_la_CPPFLAGS = ${AM_CPPFLAGS} ${SERVER_CPPFLAGS}
src_server_libmobject_server_la_CFLAGS = ${AM_CFLAGS} ${SERVER_CFLAGS}
src_server_libmobject_server_la_LIBADD = src/omap-iter/libomap-iter.la \
......
......@@ -2,6 +2,7 @@
#include <string>
#include <iostream>
#include <algorithm>
#include <vector>
#include <list>
#include <bake-client.h>
#include "src/server/core/core-read-op.h"
......@@ -10,7 +11,6 @@
#include "src/io-chain/read-resp-impl.h"
#include "src/omap-iter/omap-iter-impl.h"
#include "src/server/core/key-types.h"
#include "src/server/core/fake-kv.hpp"
#include "src/server/core/covermap.hpp"
static int tabs = 0;
......
......@@ -6,7 +6,6 @@
#include <bake-client.h>
#include "src/server/visitor-args.h"
#include "src/io-chain/write-op-visitor.h"
#include "src/server/core/fake-kv.hpp"
#if 0
static int tabs = 0;
......
#include "src/server/core/fake-kv.hpp"
bool operator<(const segment_key_t& s1, const segment_key_t& s2) {
// sort by oid first
if(s1.oid != s2.oid)
return s1.oid < s2.oid;
return s1.timestamp > s2.timestamp;
}
bool operator<(const omap_key_t& k1, const omap_key_t& k2) {
if(k1.oid != k2.oid)
return k1.oid < k2.oid;
return k1.key < k2.key;
}
std::map<oid_t, std::string> oid_map;
std::map<std::string, oid_t> name_map;
std::map<segment_key_t, bake_region_id_t> segment_map;
std::map<omap_key_t, std::vector<char>> omap_map;
#include <map>
#include <vector>
#include <string>
#include <bake-client.h>
#include "src/server/core/key-types.h"
/*
typedef uint64_t oid_t;
enum class seg_type_t : std::int32_t {
ZERO = 0,
BAKE_REGION = 1,
SMALL_REGION = 2,
TOMBSTONE = 3
};
struct segment_key_t {
oid_t oid;
seg_type_t type;
double timestamp;
uint64_t start_index; // first index, included
uint64_t end_index; // end index is not included
};
struct omap_key_t {
oid_t oid;
std::string key;
};
#define SMALL_REGION_THRESHOLD (sizeof(bake_region_id_t))
*/
bool operator<(const segment_key_t& s1, const segment_key_t& s2);
bool operator<(const omap_key_t& k1, const omap_key_t& k2);
extern std::map<oid_t, std::string> oid_map;
extern std::map<std::string, oid_t> name_map;
extern std::map<segment_key_t, bake_region_id_t> segment_map;
extern std::map<omap_key_t, std::vector<char>> omap_map;
//extern std::map<oid_t, std::size_t> size_map;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment