return;
}
+ set<int> recovering_shards;
+ ret = sync.read_recovering_shards(sync_status.sync_info.num_shards, recovering_shards);
+ if (ret < 0 && ret != ENOENT) {
+ push_ss(ss, status, tab) << string("failed read recovering shards: ") + cpp_strerror(-ret);
+ return;
+ }
+
string status_str;
switch (sync_status.sync_info.state) {
case rgw_data_sync_info::StateInit:
}
int total_behind = shards_behind.size() + (sync_status.sync_info.num_shards - num_inc);
- if (total_behind == 0) {
+ int total_recovering = recovering_shards.size();
+ if (total_behind == 0 && total_recovering == 0) {
push_ss(ss, status, tab) << "data is caught up with source";
- } else {
+ } else if (total_behind > 0) {
push_ss(ss, status, tab) << "data is behind on " << total_behind << " shards";
push_ss(ss, status, tab) << "behind shards: " << "[" << shards_behind_set << "]" ;
}
}
+ if (total_recovering > 0) {
+ push_ss(ss, status, tab) << total_recovering << " shards are recovering";
+ push_ss(ss, status, tab) << "recovering shards: " << "[" << recovering_shards << "]";
+ }
+
flush_ss(ss, status);
}