mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
cleanup debugging
This commit is contained in:
parent
cb568bbd55
commit
d3fbad74a2
@ -50,7 +50,7 @@ void DatabaseConfiguration::resetInternal() {
|
||||
perpetualStorageWiggleSpeed = 0;
|
||||
perpetualStorageWiggleLocality = "0";
|
||||
storageMigrationType = StorageMigrationType::DEFAULT;
|
||||
blobGranulesEnabled = false;
|
||||
blobGranulesEnabled = true; // TODO: default to false if merging to master
|
||||
}
|
||||
|
||||
int toInt(ValueRef const& v) {
|
||||
|
@ -1361,7 +1361,6 @@ ACTOR Future<Void> haltBlobGranules(BlobManagerData* bmData) {
|
||||
std::vector<BlobWorkerInterface> blobWorkers = wait(getBlobWorkers(bmData->db));
|
||||
std::vector<Future<Void>> deregisterBlobWorkers;
|
||||
for (auto& worker : blobWorkers) {
|
||||
printf("BM: sending halt to BW %s\n", worker.myId.toString().c_str());
|
||||
// TODO: send a special req to blob workers so they clean up granules/CFs
|
||||
bmData->addActor.send(
|
||||
brokenPromiseToNever(worker.haltBlobWorker.getReply(HaltBlobWorkerRequest(bmData->epoch, bmData->id))));
|
||||
@ -1436,7 +1435,6 @@ ACTOR Future<Void> blobManager(BlobManagerInterface bmInterf,
|
||||
break;
|
||||
}
|
||||
when(state HaltBlobGranulesRequest req = waitNext(bmInterf.haltBlobGranules.getFuture())) {
|
||||
printf("BM: got haltBlobGranules\n");
|
||||
wait(haltBlobGranules(&self));
|
||||
req.reply.send(Void());
|
||||
TraceEvent("BlobGranulesHalted", bmInterf.id()).detail("ReqID", req.requesterID);
|
||||
|
@ -53,15 +53,13 @@ struct HaltBlobManagerRequest {
|
||||
constexpr static FileIdentifier file_identifier = 4149140;
|
||||
UID requesterID;
|
||||
ReplyPromise<Void> reply;
|
||||
bool haltBlobGranules;
|
||||
|
||||
HaltBlobManagerRequest() {}
|
||||
explicit HaltBlobManagerRequest(UID uid, bool haltBlobGranules = false)
|
||||
: requesterID(uid), haltBlobGranules(haltBlobGranules) {}
|
||||
explicit HaltBlobManagerRequest(UID uid) : requesterID(uid) {}
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
serializer(ar, requesterID, reply, haltBlobGranules);
|
||||
serializer(ar, requesterID, reply);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2890,8 +2890,6 @@ ACTOR Future<Void> blobWorker(BlobWorkerInterface bwInterf,
|
||||
self->addActor.send(handleRangeAssign(self, granuleToReassign, true));
|
||||
}
|
||||
when(HaltBlobWorkerRequest req = waitNext(bwInterf.haltBlobWorker.getFuture())) {
|
||||
printf("BW %s got halt request\n", self->id.toString().c_str());
|
||||
|
||||
req.reply.send(Void());
|
||||
if (self->managerEpochOk(req.managerEpoch)) {
|
||||
TraceEvent("BlobWorkerHalted", self->id)
|
||||
|
@ -3354,7 +3354,6 @@ struct BlobManagerSingleton : Singleton<BlobManagerInterface> {
|
||||
cc->recruitBlobManager.set(true);
|
||||
}
|
||||
void haltBlobGranules(ClusterControllerData* cc, Optional<Standalone<StringRef>> pid) const {
|
||||
printf("CC: about to send haltBlobGranules\n");
|
||||
if (interface.present()) {
|
||||
cc->id_worker[pid].haltBlobManager =
|
||||
brokenPromiseToNever(interface.get().haltBlobGranules.getReply(HaltBlobGranulesRequest(cc->id)));
|
||||
@ -5392,6 +5391,7 @@ ACTOR Future<Void> monitorBlobManager(ClusterControllerData* self) {
|
||||
}
|
||||
when(wait(self->recruitBlobManager.onChange())) {}
|
||||
when(wait(watchConfigChange)) {
|
||||
// if there is a blob manager present but blob granules are now disabled, stop the BM
|
||||
if (!self->db.config.blobGranulesEnabled) {
|
||||
const auto& blobManager = self->db.serverInfo->get().blobManager;
|
||||
BlobManagerSingleton(blobManager)
|
||||
@ -5401,6 +5401,7 @@ ACTOR Future<Void> monitorBlobManager(ClusterControllerData* self) {
|
||||
}
|
||||
} else {
|
||||
wait(watchConfigChange);
|
||||
// if there is no blob manager present but blob granules are now enabled, recruit a BM
|
||||
if (self->db.config.blobGranulesEnabled) {
|
||||
wait(startBlobManager(self));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user