1
0
Fork 0

added cancellation points

Conflicts:
	arangod/Aql/ExecutionBlock.cpp
This commit is contained in:
Jan Steemann 2015-03-12 14:57:29 +01:00
parent f035ea1c3b
commit dfb70d7d96
1 changed files with 8 additions and 0 deletions

View File

@ -3756,6 +3756,8 @@ AqlItemBlock* RemoveBlock::work (std::vector<AqlItemBlock*>& blocks) {
for (auto it = blocks.begin(); it != blocks.end(); ++it) {
auto res = (*it);
auto document = res->getDocumentCollection(registerId);
throwIfKilled(); // check if we were aborted
size_t const n = res->size();
@ -3886,6 +3888,8 @@ AqlItemBlock* InsertBlock::work (std::vector<AqlItemBlock*>& blocks) {
auto document = res->getDocumentCollection(registerId);
size_t const n = res->size();
throwIfKilled(); // check if we were aborted
// loop over the complete block
for (size_t i = 0; i < n; ++i) {
AqlValue a = res->getValue(i, registerId);
@ -4020,6 +4024,8 @@ AqlItemBlock* UpdateBlock::work (std::vector<AqlItemBlock*>& blocks) {
auto document = res->getDocumentCollection(docRegisterId);
decltype(document) keyDocument = nullptr;
throwIfKilled(); // check if we were aborted
if (hasKeyVariable) {
keyDocument = res->getDocumentCollection(keyRegisterId);
}
@ -4193,6 +4199,8 @@ AqlItemBlock* ReplaceBlock::work (std::vector<AqlItemBlock*>& blocks) {
if (hasKeyVariable) {
keyDocument = res->getDocumentCollection(keyRegisterId);
}
throwIfKilled(); // check if we were aborted
size_t const n = res->size();