mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-28 02:48:09 +08:00
initalize values
This commit is contained in:
parent
cc1b8d27c9
commit
7d287edc30
@ -393,6 +393,7 @@ ACTOR Future<Void> leaderRegister(LeaderElectionRegInterface interf, Key key) {
|
|||||||
notify[i].send(newInfo);
|
notify[i].send(newInfo);
|
||||||
notify.clear();
|
notify.clear();
|
||||||
ClientDBInfo outInfo;
|
ClientDBInfo outInfo;
|
||||||
|
outInfo.isEncryptionEnabled = SERVER_KNOBS->ENABLE_ENCRYPTION;
|
||||||
outInfo.id = deterministicRandom()->randomUniqueID();
|
outInfo.id = deterministicRandom()->randomUniqueID();
|
||||||
outInfo.forward = req.conn.toString();
|
outInfo.forward = req.conn.toString();
|
||||||
clientData.clientInfo->set(CachedSerialization<ClientDBInfo>(outInfo));
|
clientData.clientInfo->set(CachedSerialization<ClientDBInfo>(outInfo));
|
||||||
@ -632,6 +633,7 @@ ACTOR Future<Void> leaderServer(LeaderElectionRegInterface interf,
|
|||||||
Optional<LeaderInfo> forward = regs.getForward(req.clusterKey);
|
Optional<LeaderInfo> forward = regs.getForward(req.clusterKey);
|
||||||
if (forward.present()) {
|
if (forward.present()) {
|
||||||
ClientDBInfo info;
|
ClientDBInfo info;
|
||||||
|
info.isEncryptionEnabled = SERVER_KNOBS->ENABLE_ENCRYPTION;
|
||||||
info.id = deterministicRandom()->randomUniqueID();
|
info.id = deterministicRandom()->randomUniqueID();
|
||||||
info.forward = forward.get().serializedInfo;
|
info.forward = forward.get().serializedInfo;
|
||||||
req.reply.send(CachedSerialization<ClientDBInfo>(info));
|
req.reply.send(CachedSerialization<ClientDBInfo>(info));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user