empiredan commented on code in PR #1315:
URL:
https://github.com/apache/incubator-pegasus/pull/1315#discussion_r1073106992
##########
src/replica/replica_learn.cpp:
##########
@@ -178,15 +173,15 @@ void replica::init_learn(uint64_t signature)
if (_app->last_committed_decree() == 0 &&
_stub->_learn_app_concurrent_count.load() >=
_options->learn_app_max_concurrent_count) {
- LOG_WARNING("%s: init_learn[%016" PRIx64 "]: learnee = %s,
learn_duration = %" PRIu64
- "ms, need to learn app because app_committed_decree = 0,
but "
- "learn_app_concurrent_count(%d) >=
learn_app_max_concurrent_count(%d), skip",
- name(),
- _potential_secondary_states.learning_version,
- _config.primary.to_string(),
- _potential_secondary_states.duration_ms(),
- _stub->_learn_app_concurrent_count.load(),
- _options->learn_app_max_concurrent_count);
+ LOG_WARNING_PREFIX(
+ "init_learn[{:#018x}]: learnee = {}, learn_duration = {} ms, need
to learn app "
+ "because app_committed_decree = 0, but
learn_app_concurrent_count({}) >= "
+ "learn_app_max_concurrent_count({}), skip",
+ _potential_secondary_states.learning_version,
+ _config.primary,
+ _potential_secondary_states.duration_ms(),
+ _stub->_learn_app_concurrent_count.load(),
Review Comment:
```suggestion
_stub->_learn_app_concurrent_count,
```
##########
src/replica/replica_learn.cpp:
##########
@@ -694,14 +685,13 @@ void replica::on_learn_reply(error_code err,
learn_request &&req, learn_response
if (resp.type == learn_type::LT_APP) {
if (++_stub->_learn_app_concurrent_count >
_options->learn_app_max_concurrent_count) {
--_stub->_learn_app_concurrent_count;
- LOG_WARNING("%s: on_learn_reply[%016" PRIx64
- "]: learnee = %s, learn_app_concurrent_count(%d) >= "
- "learn_app_max_concurrent_count(%d), skip this round",
- name(),
- _potential_secondary_states.learning_version,
- _config.primary.to_string(),
- _stub->_learn_app_concurrent_count.load(),
- _options->learn_app_max_concurrent_count);
+ LOG_WARNING_PREFIX(
+ "on_learn_reply[{:#018x}]: learnee = {},
learn_app_concurrent_count({}) >= "
+ "learn_app_max_concurrent_count({}), skip this round",
+ _potential_secondary_states.learning_version,
+ _config.primary,
+ _stub->_learn_app_concurrent_count.load(),
Review Comment:
```suggestion
_stub->_learn_app_concurrent_count,
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]