1
0
Fork 0

fix whitespace issues

This commit is contained in:
jsteemann 2019-11-21 17:34:35 +01:00
parent da1b549fe9
commit e5d6b837b9
7 changed files with 16 additions and 18 deletions

View File

@ -1793,7 +1793,7 @@ Result IResearchAnalyzerFeature::loadAnalyzers(
return {}; // db-server should not access cluster during inRecovery
}
} else if (ServerState::instance()->isSingleServer()) { // single server
if(itr != _lastLoad.end()) {
if (itr != _lastLoad.end()) {
return {}; // do not reload on single-server
}
} else if (itr != _lastLoad.end() // had a previous load

View File

@ -705,7 +705,7 @@ void RestReplicationHandler::handleCommandClusterInventory() {
DatabaseFeature& databaseFeature = _vocbase.server().getFeature<DatabaseFeature>();
TRI_vocbase_t* vocbase = databaseFeature.lookupDatabase(dbName);
if(vocbase) {
if (vocbase) {
resultBuilder.add(VPackValue(StaticStrings::Properties));
vocbase->toVelocyPack(resultBuilder);
}

View File

@ -264,7 +264,7 @@ void RocksDBTransactionCollection::trackIndexRemove(TRI_idx_iid_t iid, uint64_t
/// no other error occurred returns any other error code otherwise
int RocksDBTransactionCollection::doLock(AccessMode::Type type, int nestingLevel) {
if(AccessMode::Type::WRITE == type && _exclusiveWrites) {
if (AccessMode::Type::WRITE == type && _exclusiveWrites) {
type = AccessMode::Type::EXCLUSIVE;
}
@ -321,8 +321,7 @@ int RocksDBTransactionCollection::doLock(AccessMode::Type type, int nestingLevel
/// @brief unlock a collection
int RocksDBTransactionCollection::doUnlock(AccessMode::Type type, int nestingLevel) {
if(AccessMode::Type::WRITE == type && _exclusiveWrites) {
if (AccessMode::Type::WRITE == type && _exclusiveWrites) {
type = AccessMode::Type::EXCLUSIVE;
}

View File

@ -390,7 +390,6 @@ void addClusterOptions(VPackBuilder& builder, std::string const& sharding,
}
void addClusterOptions(VPackBuilder& builder, VocbaseOptions const& opt) {
addClusterOptions(builder, opt.sharding, opt.replicationFactor,
opt.writeConcern);
addClusterOptions(builder, opt.sharding, opt.replicationFactor, opt.writeConcern);
}
} // namespace arangodb

View File

@ -1821,13 +1821,13 @@ void TRI_vocbase_t::addReplicationApplier() {
}
void TRI_vocbase_t::toVelocyPack(VPackBuilder& result) const {
VPackObjectBuilder b(&result);
_info.toVelocyPack(result);
if (ServerState::instance()->isCoordinator()) {
result.add("path", VPackValue(path()));
} else {
result.add("path", VPackValue("none"));
}
VPackObjectBuilder b(&result);
_info.toVelocyPack(result);
if (ServerState::instance()->isCoordinator()) {
result.add("path", VPackValue(path()));
} else {
result.add("path", VPackValue("none"));
}
}
/// @brief sets prototype collection for sharding (_users or _graphs)

View File

@ -994,7 +994,7 @@ Result DumpFeature::storeDumpJson(VPackSlice const& body, std::string const& dbN
meta.add("database", VPackValue(dbName));
meta.add("lastTickAtDumpStart", VPackValue(tickString));
auto props = body.get("properties");
if(props.isObject()) {
if (props.isObject()) {
meta.add("properties", props);
}
meta.close();

View File

@ -305,7 +305,7 @@ arangodb::Result tryCreateDatabase(arangodb::application_features::ApplicationSe
object->add(arangodb::StaticStrings::DatabaseName, VPackValue(name));
// add replication factor write concern etc
if(properties.isObject()) {
if (properties.isObject()) {
ObjectBuilder guard(&builder, "options");
for(auto const& key : std::vector<std::string>{
arangodb::StaticStrings::MinReplicationFactor,
@ -313,7 +313,7 @@ arangodb::Result tryCreateDatabase(arangodb::application_features::ApplicationSe
arangodb::StaticStrings::Sharding,
}) {
VPackSlice slice = properties.get(key);
if (!slice.isNone()){
if (!slice.isNone()) {
object->add(key, slice);
}
}
@ -390,7 +390,7 @@ void getDBProperties(arangodb::ManagedDirectory& directory, VPackBuilder& builde
try {
auto props = fileContentBuilder.slice().get(arangodb::StaticStrings::Properties);
if(props.isObject()) {
if (props.isObject()) {
slice = props;
}
} catch (...) {