New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mon/PGMonitor: batch filter pg states; add sanity check #9394
Conversation
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
3d17c23
to
17be6f0
Compare
@tchaikov Some mon-related minor fixes, could you kindly help to review? Thanks:-) |
return; | ||
} | ||
|
||
MStatfsReply *reply; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could move this line down to where reply
is used for the first time.
9b2e143
to
443a9e2
Compare
propose = true; | ||
assert(pg_map.last_osdmap_epoch < epoch); | ||
pending_inc.osdmap_epoch = epoch; | ||
(void)map_pg_creates(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check_osd_map()
is the only caller of these functions. maybe we can change them so that they return void
instead?
443a9e2
to
2b67303
Compare
@tchaikov Done and thanks. |
@@ -1754,24 +1754,17 @@ void PGMap::generate_test_instances(list<PGMap*>& o) | |||
} | |||
} | |||
|
|||
void PGMap::get_filtered_pg_stats(const string& state, int64_t poolid, int64_t osdid, | |||
void PGMap::get_filtered_pg_stats(__u32 state, int64_t poolid, int64_t osdid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__u32
is a linux specific type, maybe we can try to use uint32_t
instead? i see the underlying type of pg_state_t::state
is __u32
. but we can be more portable by using these ANSI types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. And @tchaikov , I see you are busy with cmake, thank you for your time:-)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
We'll assure pg_map.last_osdmap_epoch is smaller than osdmap's epoch at the function entry, so we are doomed to update pending_inc.osdmap_epoch, which means the "propose" variables will be always set to true. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2b67303
to
2c8a2f6
Compare
We use "backfill_wait" everywhere except this one. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@@ -824,7 +824,7 @@ std::string pg_state_string(int state) | |||
oss << "repair+"; | |||
if ((state & PG_STATE_BACKFILL_WAIT) && | |||
!(state &PG_STATE_BACKFILL)) | |||
oss << "wait_backfill+"; | |||
oss << "backfill_wait+"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could update the doc/dev/osd_internals/recovery_reservation.rst
accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thank you for your reminder.
2c8a2f6
to
fbfd38c
Compare
|
||
/** | ||
* recalculate creating pg mappings | ||
* | ||
* @return true if we updated pending_inc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you update the comment accordingly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I don't understand what do you mean. It does not return anything now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, sorry, i thought you missed this.
lgtm |
@tchaikov Thanks for the merge. |
No description provided.