Skip to content

Commit 5da4d2b

Browse files
hermanleefacebook-github-bot
authored andcommitted
Fix semi_sync histogram reporting
Summary: Fix a porting bug with semi_sync histograms. Squash with D21832889 Reviewed By: george-reynya Differential Revision: D40964563 fbshipit-source-id: 8d4f7ff
1 parent 5c571fc commit 5da4d2b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/semisync/semisync_source.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,11 @@ void ReplSemiSyncMaster::setExportStats() {
12061206
((double)rpl_semi_sync_source_net_wait_num))
12071207
: 0);
12081208

1209+
for (size_t i_bins = 0; i_bins < NUMBER_OF_HISTOGRAM_BINS; ++i_bins) {
1210+
histogram_trx_wait_values[i_bins] =
1211+
latency_histogram_get_count(&histogram_trx_wait, i_bins);
1212+
}
1213+
12091214
unlock();
12101215
}
12111216

@@ -1225,11 +1230,6 @@ int ReplSemiSyncMaster::setWaitSlaveCount(unsigned int new_value) {
12251230
reportReplyBinlog(ackinfo->binlog_name, ackinfo->binlog_pos);
12261231
}
12271232

1228-
for (size_t i_bins = 0; i_bins < NUMBER_OF_HISTOGRAM_BINS; ++i_bins) {
1229-
histogram_trx_wait_values[i_bins] =
1230-
latency_histogram_get_count(&histogram_trx_wait, i_bins);
1231-
}
1232-
12331233
unlock();
12341234
return function_exit(kWho, result);
12351235
}

0 commit comments

Comments
 (0)