1
0
Fork 0

fix shard move

This commit is contained in:
Simon Grätzer 2018-08-22 12:42:57 +02:00
parent a0659c2b99
commit c3d950f1d6
4 changed files with 22 additions and 16 deletions

View File

@ -2285,8 +2285,9 @@ int MMFilesCollection::restoreIndex(transaction::Methods* trx,
return e.code(); return e.code();
} }
if (!newIdx) { if (!newIdx) { // simon: probably something wrong with ArangoSearch Links
return TRI_ERROR_ARANGO_INDEX_NOT_FOUND; LOG_TOPIC(ERR, Logger::ENGINES) << "index creation failed while restoring";
return TRI_ERROR_ARANGO_INDEX_CREATION_FAILED;
} }
TRI_UpdateTickServer(newIdx->id()); TRI_UpdateTickServer(newIdx->id());

View File

@ -1260,9 +1260,7 @@ Result DatabaseInitialSyncer::handleCollection(VPackSlice const& parameters,
if (!res.ok()) { if (!res.ok()) {
return res; return res;
} } else if (isAborted()) {
if (isAborted()) {
return Result(TRI_ERROR_REPLICATION_APPLIER_STOPPED); return Result(TRI_ERROR_REPLICATION_APPLIER_STOPPED);
} }
@ -1270,17 +1268,23 @@ Result DatabaseInitialSyncer::handleCollection(VPackSlice const& parameters,
reloadUsers(); 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 // now create indexes
TRI_ASSERT(indexes.isArray()); TRI_ASSERT(indexes.isArray());
VPackValueLength const n = indexes.length(); VPackValueLength const numIdx = indexes.length();
if (numIdx > 0) {
if (n > 0) {
if (!_config.isChild()) { if (!_config.isChild()) {
_config.batch.extend(_config.connection, _config.progress); _config.batch.extend(_config.connection, _config.progress);
_config.barrier.extend(_config.connection); _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); collectionMsg);
try { try {

View File

@ -52,13 +52,13 @@ class ReplicationApplierConfiguration {
uint64_t _initialSyncMaxWaitTime; uint64_t _initialSyncMaxWaitTime;
uint64_t _autoResyncRetries; uint64_t _autoResyncRetries;
uint32_t _sslProtocol; uint32_t _sslProtocol;
bool _skipCreateDrop; bool _skipCreateDrop; /// shards/indexes/views are created by schmutz++
bool _autoStart; bool _autoStart; /// start applier after server start
bool _adaptivePolling; bool _adaptivePolling;
bool _autoResync; bool _autoResync; /// resync completely if we miss updates
bool _includeSystem; bool _includeSystem;
bool _requireFromPresent; bool _requireFromPresent; /// while tailing WAL: master must have the clients requested tick
bool _incremental; bool _incremental; /// use incremental sync if we got local data
bool _verbose; bool _verbose;
std::string _restrictType; std::string _restrictType;
std::set<std::string> _restrictCollections; std::set<std::string> _restrictCollections;

View File

@ -468,8 +468,9 @@ int RocksDBCollection::restoreIndex(transaction::Methods* trx,
// Just report. // Just report.
return e.code(); return e.code();
} }
if (!newIdx) { if (!newIdx) { // simon: probably something wrong with ArangoSearch Links
return TRI_ERROR_ARANGO_INDEX_NOT_FOUND; LOG_TOPIC(ERR, Logger::ENGINES) << "index creation failed while restoring";
return TRI_ERROR_ARANGO_INDEX_CREATION_FAILED;
} }
TRI_ASSERT(newIdx != nullptr); TRI_ASSERT(newIdx != nullptr);