mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
Initial commit
This commit is contained in:
31
tests/fdb/KvTraits.h
Normal file
31
tests/fdb/KvTraits.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
|
||||
#include "common/kv/mem/MemKVEngine.h"
|
||||
#include "fdb/FDBKVEngine.h"
|
||||
|
||||
namespace hf3fs::testing {
|
||||
template <typename KV>
|
||||
struct KVTrait {};
|
||||
|
||||
template <>
|
||||
struct KVTrait<kv::mem::MemKV> {
|
||||
using Engine = kv::MemKVEngine;
|
||||
using State = uint64_t;
|
||||
using Transaction = kv::MemTransaction;
|
||||
|
||||
static constexpr bool kSupportConflictCheck = true;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct KVTrait<kv::fdb::DB> {
|
||||
using Engine = kv::FDBKVEngine;
|
||||
using State = std::map<String, String>;
|
||||
using Transaction = kv::FDBTransaction;
|
||||
|
||||
static constexpr bool kSupportConflictCheck = false;
|
||||
};
|
||||
|
||||
} // namespace hf3fs::testing
|
||||
Reference in New Issue
Block a user