Make OSD sort & sanitize PG history items

This commit is contained in:
Vitaliy Filippov
2023-01-01 23:17:42 +03:00
parent 0593e5c21c
commit 67019f5b02
4 changed files with 39 additions and 13 deletions
+1
View File
@@ -885,6 +885,7 @@ void osd_t::report_pg_states()
if (pg.history_changed)
{
// Prevent race conditions (for the case when the monitor is updating this key at the same time)
// FIXME: target_history updates may be lost on PG re-peering
pg.history_changed = false;
std::string history_key = base64_encode(st_cli.etcd_prefix+"/pg/history/"+std::to_string(pg.pool_id)+"/"+std::to_string(pg.pg_num));
json11::Json::object history_value = {