From f1f6f0bd30a6144c78d59f1752dca50804091ce3 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 23 Jan 2015 08:49:28 -0800 Subject: [PATCH 1/2] ReplicatedPG::hit_set_persist: write out oi.digest, these objects are immutable Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 5ebf34dc29d..fa8d1dffadd 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -11793,6 +11793,7 @@ void ReplicatedPG::hit_set_persist() obc->obs.oi.mtime = now; obc->obs.oi.size = bl.length(); obc->obs.exists = true; + obc->obs.oi.set_data_digest(bl.crc32c(-1)); ctx->new_obs = obc->obs; ctx->new_snapset.head_exists = true; From cfce41d1fe438c793ee0d3a3824773a8bf0d92a1 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Fri, 23 Jan 2015 09:07:44 -0800 Subject: [PATCH 2/2] ReplicatedPG::hit_set_persist: update ssc->snapset as well This is a hack. The correct answer is to adapt this method and finish_ctx to allow this method to use finish_ctx. This is complicated by the presence of the hit set trims in the same repop, so for now, we kick the can down the road a bit. Fixes: 10616 Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index fa8d1dffadd..5acd805f8bb 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -11796,7 +11796,9 @@ void ReplicatedPG::hit_set_persist() obc->obs.oi.set_data_digest(bl.crc32c(-1)); ctx->new_obs = obc->obs; - ctx->new_snapset.head_exists = true; + + obc->ssc->snapset.head_exists = true; + ctx->new_snapset = obc->ssc->snapset; ctx->delta_stats.num_objects++; ctx->delta_stats.num_objects_hit_set_archive++;