Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Jan 20, 2025
1 parent c3b186d commit 681d181
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/backends/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ namespace yokan {

using json = nlohmann::json;


class LogDatabase : public DatabaseInterface {

template <typename T>
Expand Down Expand Up @@ -111,6 +110,7 @@ class LogDatabase : public DatabaseInterface {
class MemoryMappedFile {

[[nodiscard]] Status syncMemory(void *addr, size_t size) {
#if 0
static long page_size = 0;
if(page_size == 0) {
// Get the system's page size
Expand Down Expand Up @@ -143,6 +143,7 @@ class LogDatabase : public DatabaseInterface {
return Status::IOError;
// LCOV_EXCL_STOP
}
#endif
return Status::OK;
}

Expand Down Expand Up @@ -674,7 +675,7 @@ class LogDatabase : public DatabaseInterface {
cfg["create_if_missing"] = create_if_missing;
auto error_if_exists = cfg.value("error_if_exists", false);
cfg["error_if_exists"] = error_if_exists;
auto use_lock = cfg.value("use_lock", true);
auto use_lock = cfg.value("use_lock", false);
cfg["use_lock"] = use_lock;
} catch(...) {
return Status::InvalidConf;
Expand Down
8 changes: 4 additions & 4 deletions src/server/provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ yk_return_t yk_provider_register(
p->bulk_cache = *a.cache;
} else {
auto& buffer_cache_type = config["buffer_cache"]["type"].get_ref<const std::string&>();
if(buffer_cache_type == "default")
if(buffer_cache_type == "default") {
p->bulk_cache = yk_default_bulk_cache;
else if(buffer_cache_type == "keep_all")
} else if(buffer_cache_type == "keep_all") {
p->bulk_cache = yk_keep_all_bulk_cache;
else if(buffer_cache_type == "lru")
} else if(buffer_cache_type == "lru") {
p->bulk_cache = yk_lru_bulk_cache;
else {
} else {
YOKAN_LOG_ERROR(mid, "Invalid buffer_cache type \"%s\"", buffer_cache_type.c_str());
delete p;
return YOKAN_ERR_INVALID_CONFIG;
Expand Down

0 comments on commit 681d181

Please sign in to comment.