Fix bug and add test
This commit is contained in:
parent
c6c0e2eb0f
commit
a53d05ea2d
|
@ -96,8 +96,11 @@ ACTOR Future<Standalone<RangeResultRef>> SpecialKeySpace::checkModuleFound(Speci
|
|||
GetRangeLimits limits, bool reverse) {
|
||||
std::pair<Standalone<RangeResultRef>, Optional<SpecialKeyRangeBaseImpl*>> result =
|
||||
wait(SpecialKeySpace::getRangeAggregationActor(pks, ryw, begin, end, limits, reverse));
|
||||
if (ryw && !ryw->specialKeySpaceRelaxed() && !result.second.present()) {
|
||||
throw special_keys_no_module_found();
|
||||
if (ryw && !ryw->specialKeySpaceRelaxed()) {
|
||||
auto* module = result.second.orDefault(nullptr);
|
||||
if (module == nullptr) {
|
||||
throw special_keys_no_module_found();
|
||||
}
|
||||
}
|
||||
return result.first;
|
||||
}
|
||||
|
|
|
@ -270,6 +270,13 @@ struct SpecialKeySpaceCorrectnessWorkload : TestWorkload {
|
|||
}
|
||||
TEST(true); // Read write conflict range of committed transaction
|
||||
}
|
||||
try {
|
||||
wait(success(tx->get(LiteralStringRef("\xff\xff/1314109/i_hope_this_isn't_registered"))));
|
||||
ASSERT(false);
|
||||
} catch (Error& e) {
|
||||
if (e.code() == error_code_actor_cancelled) throw;
|
||||
ASSERT(e.code() == error_code_special_keys_no_module_found);
|
||||
}
|
||||
for (int i = 0; i < self->conflictRangeSizeFactor; ++i) {
|
||||
GetRangeLimits limit;
|
||||
KeySelector begin;
|
||||
|
|
Loading…
Reference in New Issue