mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-15 18:32:18 +08:00
Update the storage cache to handle all requests types. Most assert false, one is updated to send a broken_promise as a workaround to the fact that we do expect some requests to go there.
This commit is contained in:
parent
320c115c71
commit
052220f8ab
@ -2223,6 +2223,27 @@ ACTOR Future<Void> storageCacheServer(StorageServerInterface ssi,
|
||||
when(ReplyPromise<KeyValueStoreType> reply = waitNext(ssi.getKeyValueStoreType.getFuture())) {
|
||||
ASSERT(false);
|
||||
}
|
||||
|
||||
when(GetKeyValuesAndFlatMapRequest req = waitNext(ssi.getKeyValuesAndFlatMap.getFuture())) {
|
||||
ASSERT(false);
|
||||
}
|
||||
when(WaitMetricsRequest req = waitNext(ssi.waitMetrics.getFuture())) { ASSERT(false); }
|
||||
when(SplitMetricsRequest req = waitNext(ssi.splitMetrics.getFuture())) { ASSERT(false); }
|
||||
when(GetStorageMetricsRequest req = waitNext(ssi.getStorageMetrics.getFuture())) { ASSERT(false); }
|
||||
when(ReadHotSubRangeRequest req = waitNext(ssi.getReadHotRanges.getFuture())) { ASSERT(false); }
|
||||
when(SplitRangeRequest req = waitNext(ssi.getRangeSplitPoints.getFuture())) { ASSERT(false); }
|
||||
when(GetKeyValuesStreamRequest req = waitNext(ssi.getKeyValuesStream.getFuture())) { ASSERT(false); }
|
||||
when(ChangeFeedStreamRequest req = waitNext(ssi.changeFeedStream.getFuture())) { ASSERT(false); }
|
||||
when(OverlappingChangeFeedsRequest req = waitNext(ssi.overlappingChangeFeeds.getFuture())) {
|
||||
// Simulate endpoint not found so that the requester will try another endpoint
|
||||
// This is a workaround to the fact that storage servers do not have an easy way to enforce this
|
||||
// request goes only to other storage servers, and in simulation we manage to trigger this behavior
|
||||
req.reply.sendError(broken_promise());
|
||||
}
|
||||
when(ChangeFeedPopRequest req = waitNext(ssi.changeFeedPop.getFuture())) { ASSERT(false); }
|
||||
when(ChangeFeedVersionUpdateRequest req = waitNext(ssi.changeFeedVersionUpdate.getFuture())) {
|
||||
ASSERT(false);
|
||||
}
|
||||
when(wait(actors.getResult())) {}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user