1
0
Fork 0

Wait for initial collection sync..(not yet working properly)

This commit is contained in:
Andreas Streichardt 2016-12-08 14:54:27 +01:00
parent ce03d08e8b
commit 29bb68031e
2 changed files with 17 additions and 2 deletions

View File

@ -56,10 +56,21 @@ int AqlTransaction::processCollectionCoordinator(aql::Collection* collection) {
/// @brief add a regular collection to the transaction
int AqlTransaction::processCollectionNormal(aql::Collection* collection) {
arangodb::LogicalCollection const* col =
this->resolver()->getCollectionStruct(collection->getName());
TRI_voc_cid_t cid = 0;
arangodb::LogicalCollection const* col =
this->resolver()->getCollectionStruct(collection->getName());
if (col == nullptr) {
auto startTime = TRI_microtime();
auto endTime = startTime + 60.0;
do {
usleep(10000);
if (TRI_microtime() > endTime) {
break;
}
col = this->resolver()->getCollectionStruct(collection->getName());
} while (col == nullptr);
}
if (col != nullptr) {
cid = col->cid();
}

View File

@ -461,6 +461,10 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
// mop: only allow satellite collections to be created explicitly
if (_replicationFactor > 0 && _replicationFactor <= 10) {
isError = false;
#ifdef USE_ENTERPRISE
} else if (_replicationFactor == 0) {
isError = false;
#endif
}
}
#ifdef USE_ENTERPRISE