From a3d2c6b6a0cffe6201d1d695b2fb1cd24ae0141d Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Mon, 8 May 2017 16:48:18 -0400 Subject: [PATCH] PGLog: continuation, store extra duplicate ops beyond the normal log entries This helps us avoid replaying non-idempotent client operations when the pg log is very short, e.g. in an effort to force OSDs to use backfill rather than regular recovery. This can be advantageous to avoid blocking i/o to objects, at the cost of longer total time to become clean (since backfill requires scanning the objects to see what is missing). Signed-off-by: J. Eric Ivancich --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 19 +- src/osd/PG.cc | 6 +- src/osd/PGLog.cc | 218 ++++++++--- src/osd/PGLog.h | 205 +++++++--- src/osd/osd_types.cc | 22 +- src/osd/osd_types.h | 40 +- src/test/osd/TestPGLog.cc | 607 +++++++++++++++++++++++++++-- src/tools/ceph_objectstore_tool.cc | 4 +- 9 files changed, 955 insertions(+), 167 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index c0b0192d98a..c70eb83c73d 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -815,6 +815,7 @@ OPTION(osd_pg_epoch_persisted_max_stale, OPT_U32) // make this < map_cache_size! OPTION(osd_min_pg_log_entries, OPT_U32) // number of entries to keep in the pg log when trimming it OPTION(osd_max_pg_log_entries, OPT_U32) // max entries, say when degraded, before we trim +OPTION(osd_pg_log_dups_tracked, OPT_U32) // how many versions back to track combined in both pglog's regular + dup logs OPTION(osd_force_recovery_pg_log_entries_factor, OPT_FLOAT) // max entries factor before force recovery OPTION(osd_pg_log_trim_min, OPT_U32) OPTION(osd_op_complaint_time, OPT_FLOAT) // how many seconds old makes an op complaint-worthy diff --git a/src/common/options.cc b/src/common/options.cc index ed7dc0c9666..b4229d6306b 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2248,12 +2248,25 @@ std::vector