mirror of https://gitee.com/bigwinds/arangodb
Wait for initial collection sync..(not yet working properly)
This commit is contained in:
parent
ce03d08e8b
commit
29bb68031e
|
@ -56,10 +56,21 @@ int AqlTransaction::processCollectionCoordinator(aql::Collection* collection) {
|
||||||
/// @brief add a regular collection to the transaction
|
/// @brief add a regular collection to the transaction
|
||||||
|
|
||||||
int AqlTransaction::processCollectionNormal(aql::Collection* collection) {
|
int AqlTransaction::processCollectionNormal(aql::Collection* collection) {
|
||||||
arangodb::LogicalCollection const* col =
|
|
||||||
this->resolver()->getCollectionStruct(collection->getName());
|
|
||||||
TRI_voc_cid_t cid = 0;
|
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) {
|
if (col != nullptr) {
|
||||||
cid = col->cid();
|
cid = col->cid();
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,6 +461,10 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
|
||||||
// mop: only allow satellite collections to be created explicitly
|
// mop: only allow satellite collections to be created explicitly
|
||||||
if (_replicationFactor > 0 && _replicationFactor <= 10) {
|
if (_replicationFactor > 0 && _replicationFactor <= 10) {
|
||||||
isError = false;
|
isError = false;
|
||||||
|
#ifdef USE_ENTERPRISE
|
||||||
|
} else if (_replicationFactor == 0) {
|
||||||
|
isError = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef USE_ENTERPRISE
|
#ifdef USE_ENTERPRISE
|
||||||
|
|
Loading…
Reference in New Issue