Add some debug.

GitOrigin-RevId: 29b2efa626ed4a6a0c0eb2ac2cec2fb245e9e6b5
This commit is contained in:
levlam 2018-06-25 01:51:15 +03:00
parent 54d5b70abf
commit b4d6662f71
5 changed files with 14 additions and 8 deletions

View File

@ -2058,7 +2058,7 @@ Status SecretChatActor::on_inbound_action(secret_api::decryptedMessageActionTypi
// Perfect Forward Secrecy
void SecretChatActor::on_outbound_action(secret_api::decryptedMessageActionRequestKey &request_key) {
CHECK(pfs_state_.state == PfsState::WaitSendRequest || pfs_state_.state == PfsState::SendRequest);
CHECK(pfs_state_.state == PfsState::WaitSendRequest || pfs_state_.state == PfsState::SendRequest) << pfs_state_;
pfs_state_.state = PfsState::WaitRequestResponse;
on_pfs_state_changed();
}

View File

@ -169,8 +169,11 @@ Result<Part> PartsManager::start_part() {
}
Status PartsManager::set_known_prefix(size_t size, bool is_ready) {
CHECK(known_prefix_flag_);
CHECK(size >= static_cast<size_t>(known_prefix_size_));
CHECK(known_prefix_flag_) << unknown_size_flag_ << " " << size << " " << is_ready << " " << known_prefix_size_ << " "
<< expected_size_ << " " << part_count_ << " " << part_status_.size();
CHECK(size >= static_cast<size_t>(known_prefix_size_))
<< unknown_size_flag_ << " " << size << " " << is_ready << " " << known_prefix_size_ << " " << expected_size_
<< " " << part_count_ << " " << part_status_.size();
known_prefix_size_ = narrow_cast<int64>(size);
expected_size_ = max(known_prefix_size_, expected_size_);

View File

@ -42,7 +42,7 @@ static void parse(NetStatsData &net_stats, T &parser) {
}
void NetStatsManager::init() {
CHECK(!empty());
CHECK(!empty()) << G()->close_flag();
class NetStatsInternalCallback : public NetStats::Callback {
public:
NetStatsInternalCallback(ActorId<NetStatsManager> parent, size_t id) : parent_(std::move(parent)), id_(id) {

View File

@ -134,7 +134,9 @@ EventGuard::~EventGuard() {
swap_context(info);
CHECK(info->is_lite() || save_context_ == info->get_context());
#ifdef TD_DEBUG
CHECK(info->is_lite() || save_log_tag2_ == info->get_name().c_str());
CHECK(info->is_lite() || save_log_tag2_ == info->get_name().c_str())
<< info->is_lite() << " " << info->empty() << " " << info->is_migrating() << " " << save_log_tag2_ << " "
<< info->get_name() << " " << scheduler_->close_flag_;
#endif
if (event_context_.flags & Scheduler::EventContext::Stop) {
scheduler_->do_stop_actor(info);
@ -288,7 +290,8 @@ void Scheduler::register_migrated_actor(ActorInfo *actor_info) {
VLOG(actor) << "Register migrated actor: " << tag("name", *actor_info) << tag("ptr", actor_info)
<< tag("actor_count", actor_count_);
actor_count_++;
CHECK(actor_info->is_migrating());
CHECK(actor_info->is_migrating()) << *actor_info << " " << actor_count_ << " " << sched_id_ << " "
<< actor_info->migrate_dest() << " " << actor_info->is_running() << close_flag_;
CHECK(sched_id_ == actor_info->migrate_dest());
// CHECK(!actor_info->is_running());
actor_info->finish_migrate();

View File

@ -40,7 +40,7 @@ class PathView {
}
Slice parent_dir() const {
return Slice(path_.begin(), last_slash_ + 1);
return path_.substr(0, last_slash_ + 1);
}
Slice extension() const {
@ -51,7 +51,7 @@ class PathView {
}
Slice without_extension() const {
return Slice(path_.begin(), last_dot_);
return path_.substr(0, last_dot_);
}
Slice file_stem() const {