Skip to content

Commit

Permalink
add option: UDPMaxSize
Browse files Browse the repository at this point in the history
  • Loading branch information
wodesuck committed Nov 17, 2016
1 parent b01c5d1 commit 48023ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions phxbinlogsvr/config/phxbinlog_svr_base_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void PHXBinlogSvrBaseConfig::ReadPaxosConfig() {
paxos_port_ = GetInteger("PaxosOption", "PaxosPort", 0);
paxos_log_num_ = GetInteger("PaxosOption", "LogNum", 1000000);
packet_mode_ = GetInteger("PaxosOption", "PacketMode", 0);
udp_max_size_ = GetInteger("PaxosOption", "UDPMaxSize", 4096);
}

void PHXBinlogSvrBaseConfig::ReadAgentConfig() {
Expand Down Expand Up @@ -115,6 +116,10 @@ uint32_t PHXBinlogSvrBaseConfig::GetPaxosLogNum() const {
return paxos_log_num_;
}

uint32_t PHXBinlogSvrBaseConfig::GetUDPMaxSize() const {
return udp_max_size_;
}

uint32_t PHXBinlogSvrBaseConfig::GetMasterLeaseTime() const {
return master_lease_time_;
}
Expand Down
5 changes: 3 additions & 2 deletions phxbinlogsvr/core/paxos/paxos_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ void PaxosAgent::SetPaxosOption() {
}

paxos_option_.bIsLargeValueMode = option_->GetBinLogSvrConfig()->GetPackageMode();
paxos_option_.iUDPMaxSize = option_->GetBinLogSvrConfig()->GetUDPMaxSize();

ColorLogInfo("set gourp count %u path %s log path %s, package mode %d", paxos_option_.iGroupCount,
ColorLogInfo("set gourp count %u path %s log path %s, package mode %d, udp size %u", paxos_option_.iGroupCount,
paxos_option_.sLogStoragePath.c_str(), option_->GetBinLogSvrConfig()->GetPaxosLogPath(),
option_->GetBinLogSvrConfig()->GetPackageMode());
option_->GetBinLogSvrConfig()->GetPackageMode(), paxos_option_.iUDPMaxSize);
SetPaxosNodeList(false);
}

Expand Down

0 comments on commit 48023ac

Please sign in to comment.