PG::publish_stats_to_osd() does not get called when trimming snap objects (TestStrays.test_snapshot_remove failure)
'ceph df' shows the data pool still contains 2 objects. This is OSD issue, it seem that PG::publish_stats_to_osd() is not called when trimming snap objects
ReplicatedPG: be more careful about calling publish_stats_to_osd() correctly
We had moved the call out of eval_repop into a lambda, but that left out
a few other code paths and is fragile. So just call it unconditionally in
eval_repop() when we're done with the repop instead.
Signed-off-by: Greg Farnum <email@example.com>
#6 Updated by Greg Farnum over 6 years ago
- Status changed from New to In Progress
- Assignee changed from Zheng Yan to Greg Farnum
Okay, the problem actually got started in cc1b2c6f342b17d6e304560c23f4ce310d6690d9 ("ReplicatedPG: move client reply handling out of eval_repop"), in which the call to publish_stats_to_osd() got moved out of ReplicatedPG::eval_repop and into ReplicatedPG::execute_ctx()'s ctx->register_on_commit() lambda.
But that path is not used for the local ops which trim snapshots, and I think also the path followed in finish_promote(). That leads me to think we just want to unconditionally call publish_stats_to_osd() in ReplicatedPG::eval_repop(), rather than trying to bunch it up with the log_op_stats() call in the execute_ctx() lambda.
#7 Updated by John Spray over 6 years ago
- Subject changed from PG::publish_stats_to_osd() does not get called when trimming snap objects to PG::publish_stats_to_osd() does not get called when trimming snap objects (TestStrays.test_snapshot_remove failure)
Updating description with test name so that I can find it on a search
#8 Updated by Greg Farnum over 6 years ago
- Assignee changed from Greg Farnum to Samuel Just
This passed fs suite testing (although of course that doesn't exercise RADOS bits at all). http://pulpito.ceph.com/gregf-2016-03-10_23:53:12-fs-greg-fs-testing-310-1---basic-mira/