Revision 6d61d510 src/raft/FedReplicaManager.cc
src/raft/FedReplicaManager.cc | ||
---|---|---|
221 | 221 |
|
222 | 222 |
void FedReplicaManager::add_zone(int zone_id) |
223 | 223 |
{ |
224 |
std::ostringstream oss; |
|
225 |
|
|
224 | 226 |
Nebula& nd = Nebula::instance(); |
225 | 227 |
ZonePool * zpool = nd.get_zonepool(); |
226 | 228 |
|
... | ... | |
234 | 236 |
|
235 | 237 |
zones.insert(make_pair(zone_id, zs)); |
236 | 238 |
|
237 |
pthread_mutex_unlock(&mutex); |
|
239 |
oss << "Starting federation replication thread for slave: " << zone_id; |
|
240 |
|
|
241 |
NebulaLog::log("FRM", Log::INFO, oss); |
|
238 | 242 |
|
239 | 243 |
add_replica_thread(zone_id); |
244 |
|
|
245 |
pthread_mutex_unlock(&mutex); |
|
240 | 246 |
} |
241 | 247 |
|
242 | 248 |
/* -------------------------------------------------------------------------- */ |
243 | 249 |
|
244 | 250 |
void FedReplicaManager::delete_zone(int zone_id) |
245 | 251 |
{ |
252 |
std::ostringstream oss; |
|
253 |
|
|
246 | 254 |
std::map<int, ZoneServers *>::iterator it; |
247 | 255 |
|
248 | 256 |
pthread_mutex_lock(&mutex); |
... | ... | |
258 | 266 |
|
259 | 267 |
zones.erase(it); |
260 | 268 |
|
261 |
pthread_mutex_unlock(&mutex); |
|
269 |
oss << "Stopping replication thread for slave: " << zone_id; |
|
270 |
|
|
271 |
NebulaLog::log("FRM", Log::INFO, oss); |
|
262 | 272 |
|
263 | 273 |
delete_replica_thread(zone_id); |
274 |
|
|
275 |
pthread_mutex_unlock(&mutex); |
|
264 | 276 |
}; |
265 | 277 |
|
266 | 278 |
/* -------------------------------------------------------------------------- */ |
Also available in: Unified diff