Waiting for just sync can make clients lose requests when mds and osds die
simultaneously. Now that we have an early_reply, the performance impact
from always waiting for safe is mostly gone.
mds_rdcap_ttl_ms: 60*1000,
mds_log: true,
+ mds_log_unsafe: false, // only wait for log sync, when it's mostly safe to do so
mds_log_max_events: -1,
mds_log_max_segments: 100, // segment size defined by FileLayout, above
mds_log_max_expiring: 20,
int mds_rdcap_ttl_ms;
bool mds_log;
+ bool mds_log_unsafe;
int mds_log_max_events;
int mds_log_max_segments;
int mds_log_max_expiring;
if (c) {
unflushed = 0;
+
+ if (!g_conf.mds_log_unsafe)
+ wait_safe = true;
+
journaler->flush(wait_safe ? 0:c);
if (wait_safe)
journaler->wait_for_flush(0, c);
void MDLog::wait_for_sync( Context *c )
{
+ if (!g_conf.mds_log_unsafe)
+ return wait_for_safe(c);
+
if (g_conf.mds_log) {
// wait
journaler->wait_for_flush(c, 0);