mirror of https://gitee.com/bigwinds/arangodb
fix shard move
This commit is contained in:
parent
a0659c2b99
commit
c3d950f1d6
|
@ -2285,8 +2285,9 @@ int MMFilesCollection::restoreIndex(transaction::Methods* trx,
|
|||
return e.code();
|
||||
}
|
||||
|
||||
if (!newIdx) {
|
||||
return TRI_ERROR_ARANGO_INDEX_NOT_FOUND;
|
||||
if (!newIdx) { // simon: probably something wrong with ArangoSearch Links
|
||||
LOG_TOPIC(ERR, Logger::ENGINES) << "index creation failed while restoring";
|
||||
return TRI_ERROR_ARANGO_INDEX_CREATION_FAILED;
|
||||
}
|
||||
|
||||
TRI_UpdateTickServer(newIdx->id());
|
||||
|
|
|
@ -1260,9 +1260,7 @@ Result DatabaseInitialSyncer::handleCollection(VPackSlice const& parameters,
|
|||
|
||||
if (!res.ok()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
if (isAborted()) {
|
||||
} else if (isAborted()) {
|
||||
return Result(TRI_ERROR_REPLICATION_APPLIER_STOPPED);
|
||||
}
|
||||
|
||||
|
@ -1270,17 +1268,23 @@ Result DatabaseInitialSyncer::handleCollection(VPackSlice const& parameters,
|
|||
reloadUsers();
|
||||
}
|
||||
|
||||
// schmutz++ creates indexes on DBServers
|
||||
if (_config.applier._skipCreateDrop) {
|
||||
_config.progress.set("creating indexes for " + collectionMsg +
|
||||
" skipped because of configuration");
|
||||
return res;
|
||||
}
|
||||
|
||||
// now create indexes
|
||||
TRI_ASSERT(indexes.isArray());
|
||||
VPackValueLength const n = indexes.length();
|
||||
|
||||
if (n > 0) {
|
||||
VPackValueLength const numIdx = indexes.length();
|
||||
if (numIdx > 0) {
|
||||
if (!_config.isChild()) {
|
||||
_config.batch.extend(_config.connection, _config.progress);
|
||||
_config.barrier.extend(_config.connection);
|
||||
}
|
||||
|
||||
_config.progress.set("creating " + std::to_string(n) + " index(es) for " +
|
||||
_config.progress.set("creating " + std::to_string(numIdx) + " index(es) for " +
|
||||
collectionMsg);
|
||||
|
||||
try {
|
||||
|
|
|
@ -52,13 +52,13 @@ class ReplicationApplierConfiguration {
|
|||
uint64_t _initialSyncMaxWaitTime;
|
||||
uint64_t _autoResyncRetries;
|
||||
uint32_t _sslProtocol;
|
||||
bool _skipCreateDrop;
|
||||
bool _autoStart;
|
||||
bool _skipCreateDrop; /// shards/indexes/views are created by schmutz++
|
||||
bool _autoStart; /// start applier after server start
|
||||
bool _adaptivePolling;
|
||||
bool _autoResync;
|
||||
bool _autoResync; /// resync completely if we miss updates
|
||||
bool _includeSystem;
|
||||
bool _requireFromPresent;
|
||||
bool _incremental;
|
||||
bool _requireFromPresent; /// while tailing WAL: master must have the clients requested tick
|
||||
bool _incremental; /// use incremental sync if we got local data
|
||||
bool _verbose;
|
||||
std::string _restrictType;
|
||||
std::set<std::string> _restrictCollections;
|
||||
|
|
|
@ -468,8 +468,9 @@ int RocksDBCollection::restoreIndex(transaction::Methods* trx,
|
|||
// Just report.
|
||||
return e.code();
|
||||
}
|
||||
if (!newIdx) {
|
||||
return TRI_ERROR_ARANGO_INDEX_NOT_FOUND;
|
||||
if (!newIdx) { // simon: probably something wrong with ArangoSearch Links
|
||||
LOG_TOPIC(ERR, Logger::ENGINES) << "index creation failed while restoring";
|
||||
return TRI_ERROR_ARANGO_INDEX_CREATION_FAILED;
|
||||
}
|
||||
|
||||
TRI_ASSERT(newIdx != nullptr);
|
||||
|
|
Loading…
Reference in New Issue