1
0
Fork 0

Feature 3.3/forward compatible sync (#6001)

This commit is contained in:
Wilfried Goesgens 2018-07-30 08:55:26 +02:00 committed by Jan
parent 92a0c395de
commit ccc339ca46
5 changed files with 30 additions and 8 deletions

View File

@ -398,7 +398,7 @@ std::shared_ptr<Index> MMFilesIndexFactory::prepareIndexFromSlice(
} }
return std::make_shared<MMFilesEdgeIndex>(iid, col); return std::make_shared<MMFilesEdgeIndex>(iid, col);
} }
if (typeString == "geo1" || typeString == "geo2") { if (typeString == "geo1" || typeString == "geo2" || typeString == "geo") {
return std::make_shared<MMFilesGeoIndex>(iid, col, info); return std::make_shared<MMFilesGeoIndex>(iid, col, info);
} }
if (typeString == "hash") { if (typeString == "hash") {

View File

@ -719,18 +719,22 @@ Result TailingSyncer::applyLogMarker(VPackSlice const& slice,
} }
else if (type == REPLICATION_VIEW_CREATE) { else if (type == REPLICATION_VIEW_CREATE) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_NOT_IMPLEMENTED, LOG_TOPIC(WARN, Logger::REPLICATION) << "views not supported in 3.3";
"view create not yet implemented"); return Result();
} }
else if (type == REPLICATION_VIEW_DROP) { else if (type == REPLICATION_VIEW_DROP) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_NOT_IMPLEMENTED, LOG_TOPIC(WARN, Logger::REPLICATION) << "views not supported in 3.3";
"view drop not yet implemented"); return Result();
} }
else if (type == REPLICATION_VIEW_CHANGE) { else if (type == REPLICATION_VIEW_CHANGE) {
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_NOT_IMPLEMENTED, LOG_TOPIC(WARN, Logger::REPLICATION) << "views not supported in 3.3";
"view change not yet implemented"); return Result();
}
else if (type == REPLICATION_VIEW_RENAME) {
LOG_TOPIC(WARN, Logger::REPLICATION) << "views not supported in 3.3";
return Result();
} }
else if (type == REPLICATION_DATABASE_CREATE || else if (type == REPLICATION_DATABASE_CREATE ||

View File

@ -352,6 +352,16 @@ RestStatus RestReplicationHandler::execute() {
goto BAD_CALL; goto BAD_CALL;
} }
handleCommandRestoreData(); handleCommandRestoreData();
} else if (command == "restore-view") {
LOG_TOPIC(WARN, Logger::REPLICATION) << "views not supported in 3.3";
if (type != rest::RequestType::PUT) {
goto BAD_CALL;
}
VPackBuilder result;
result.openObject();
result.close();
generateResult(rest::ResponseCode::OK, result.slice());
return RestStatus::DONE;
} else if (command == "sync") { } else if (command == "sync") {
if (type != rest::RequestType::PUT) { if (type != rest::RequestType::PUT) {
goto BAD_CALL; goto BAD_CALL;

View File

@ -397,7 +397,7 @@ std::shared_ptr<Index> RocksDBIndexFactory::prepareIndexFromSlice(
if (typeString == "persistent") { if (typeString == "persistent") {
return std::make_shared<RocksDBPersistentIndex>(iid, col, info); return std::make_shared<RocksDBPersistentIndex>(iid, col, info);
} }
if (typeString == "geo1" || typeString == "geo2") { if (typeString == "geo1" || typeString == "geo2" || typeString == "geo") {
return std::make_shared<RocksDBGeoIndex>(iid, col, info); return std::make_shared<RocksDBGeoIndex>(iid, col, info);
} }
if (typeString == "fulltext") { if (typeString == "fulltext") {

View File

@ -83,6 +83,14 @@ KeyGenerator::GeneratorType KeyGenerator::generatorType(
if (typeName == AutoIncrementKeyGenerator::name()) { if (typeName == AutoIncrementKeyGenerator::name()) {
return KeyGenerator::TYPE_AUTOINCREMENT; return KeyGenerator::TYPE_AUTOINCREMENT;
} }
if ((typeName == "uuid") || (typeName == "padded")) {
LOG_TOPIC(WARN, Logger::REPLICATION) <<
"key generator '" <<
typeName <<
"' not supported in 3.3 - falling back to " <<
TraditionalKeyGenerator::name();
return KeyGenerator::TYPE_TRADITIONAL;
}
// error // error
return KeyGenerator::TYPE_UNKNOWN; return KeyGenerator::TYPE_UNKNOWN;