Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
fix deadlock when binlog offset of slave partition is larger than master
Browse files Browse the repository at this point in the history
  • Loading branch information
CatKang committed Jan 15, 2018
1 parent 4ed1c44 commit 4ceebc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/zp_data_partition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,8 @@ void Partition::BecomeSlave() {

// Get binlog offset when I win the election
// Return false if I'm not a master
// Requeired: hold read lock of state_rw_
bool Partition::GetWinBinlogOffset(BinlogOffset* win) {
slash::RWLock l(&state_rw_, false);
if (role_ != Role::kNodeMaster) {
return false;
}
Expand Down

0 comments on commit 4ceebc6

Please sign in to comment.