1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00

fixes for v1.18.0 (#2956)

* fix server: change table_growth_margin default value

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2024-04-24 18:21:14 +03:00 committed by GitHub
parent df598e4825
commit d5cd0ed204
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View file

@ -29,7 +29,7 @@ ABSL_FLAG(uint32_t, max_segment_to_consider, 4,
"The maximum number of dashtable segments to scan in each eviction "
"when heartbeat based eviction is triggered under memory pressure.");
ABSL_FLAG(double, table_growth_margin, 1.1,
ABSL_FLAG(double, table_growth_margin, 0.4,
"Prevents table from growing if number of free slots x average object size x this ratio "
"is larger than memory budget.");

View file

@ -32,7 +32,7 @@
#include "server/transaction.h"
using namespace std;
ABSL_DECLARE_FLAG(string, dir);
ABSL_DECLARE_FLAG(bool, info_replication_valkey_compatible);
namespace dfly {
@ -63,7 +63,7 @@ std::string_view SyncStateName(DflyCmd::SyncState sync_state) {
case DflyCmd::SyncState::FULL_SYNC:
return "full_sync";
case DflyCmd::SyncState::STABLE_SYNC:
return "stable_sync";
return absl::GetFlag(FLAGS_info_replication_valkey_compatible) ? "online" : "stable_sync";
case DflyCmd::SyncState::CANCELLED:
return "cancelled";
}

View file

@ -30,7 +30,7 @@
#include "server/tiered_storage.h"
#include "server/transaction.h"
ABSL_FLAG(bool, jsonpathv2, true,
ABSL_FLAG(bool, jsonpathv2, false,
"If true uses Dragonfly jsonpath implementation, "
"otherwise uses legacy jsoncons implementation.");
ABSL_FLAG(bool, experimental_flat_json, false, "If true uses flat json implementation.");

View file

@ -331,6 +331,7 @@ class DflyInstanceFactory:
args.setdefault("maxmemory", "8G")
vmod = "dragonfly_connection=1,accept_server=1,listener_interface=1,main_service=1,rdb_save=1,replica=1,cluster_family=1"
args.setdefault("vmodule", vmod)
args.setdefault("jsonpathv2")
for k, v in args.items():
args[k] = v.format(**self.params.env) if isinstance(v, str) else v