MCPcopy Create free account
hub / github.com/apache/mesos / finalize

Method finalize

src/log/log.cpp:128–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126
127
128void LogProcess::finalize()
129{
130 if (recovering.isSome()) {
131 // Stop the recovery if it is still pending.
132 Future<Owned<Replica>> future = recovering.get();
133 future.discard();
134 }
135
136 // If there exist operations that are gated by the recovery, we fail
137 // all of them because the log is being deleted.
138 foreach (process::Promise<Shared<Replica>>* promise, promises) {
139 promise->fail("Log is being deleted");
140 delete promise;
141 }
142 promises.clear();
143
144 delete group;
145
146 // Wait for the shared pointers 'network' and 'replica' to become
147 // unique (i.e., no other reference to them). These calls should not
148 // be blocking for too long because at this moment, all operations
149 // should have been cancelled or are being cancelled. We do this
150 // because we want to make sure that after the log is deleted, all
151 // operations associated with this log are terminated.
152 network.own().await();
153 replica.own().await();
154}
155
156
157Future<Shared<Replica>> LogProcess::recover()

Callers

nothing calls this directly

Calls 8

ownMethod · 0.80
foreachFunction · 0.70
isSomeMethod · 0.45
getMethod · 0.45
discardMethod · 0.45
failMethod · 0.45
clearMethod · 0.45
awaitMethod · 0.45

Tested by

no test coverage detected