1
0
Fork 0

Merge branch 'devel' of ssh://github.com/arangodb/ArangoDB into feature/minReplicationFactor

This commit is contained in:
Michael Hackstein 2019-07-02 16:12:39 +02:00
commit cef60902a6
7 changed files with 12 additions and 9 deletions

View File

@ -49,7 +49,7 @@ Removing without *force*:
var analyzers = require("@arangodb/analyzers"); var analyzers = require("@arangodb/analyzers");
var db = require("@arangodb").db; var db = require("@arangodb").db;
var analyzerName = "testAnalyzer"; var analyzerName = "testAnalyzer";
analyzers.save(analyzerName, "identity", "test properties"); analyzers.save(analyzerName, "identity");
// removal // removal
var url = "/_api/analyzer/" + encodeURIComponent(analyzerName); var url = "/_api/analyzer/" + encodeURIComponent(analyzerName);
@ -66,7 +66,7 @@ Removing with *force*:
var analyzers = require("@arangodb/analyzers"); var analyzers = require("@arangodb/analyzers");
var db = require("@arangodb").db; var db = require("@arangodb").db;
var analyzerName = "testAnalyzer"; var analyzerName = "testAnalyzer";
analyzers.save(analyzerName, "identity", "test properties"); analyzers.save(analyzerName, "identity");
// create analyzer reference // create analyzer reference
var url = "/_api/collection"; var url = "/_api/collection";

View File

@ -32,7 +32,7 @@ Retrieve an analyzer definition:
var analyzers = require("@arangodb/analyzers"); var analyzers = require("@arangodb/analyzers");
var db = require("@arangodb").db; var db = require("@arangodb").db;
var analyzerName = "testAnalyzer"; var analyzerName = "testAnalyzer";
analyzers.save(analyzerName, "identity", "test properties"); analyzers.save(analyzerName, "identity");
// retrieval // retrieval
var url = "/_api/analyzer/" + encodeURIComponent(analyzerName); var url = "/_api/analyzer/" + encodeURIComponent(analyzerName);

View File

@ -166,6 +166,7 @@ void IndexNode::initIndexCoversProjections() {
} }
_coveringIndexAttributePositions = std::move(coveringAttributePositions); _coveringIndexAttributePositions = std::move(coveringAttributePositions);
_options.forceProjection = true;
} }
/// @brief toVelocyPack, for IndexNode /// @brief toVelocyPack, for IndexNode

View File

@ -199,6 +199,7 @@ function checkMonitorAlive (binary, arangod, options, res) {
arangod.monitor.monitorExited = true; arangod.monitor.monitorExited = true;
arangod.monitor.pid = null; arangod.monitor.pid = null;
pu.serverCrashed = true; pu.serverCrashed = true;
options.cleanup = false;
arangod['exitStatus'] = {}; arangod['exitStatus'] = {};
analyzeCrash(binary, arangod, options, "the process monitor commanded error"); analyzeCrash(binary, arangod, options, "the process monitor commanded error");
Object.assign(arangod.exitStatus, Object.assign(arangod.exitStatus,

View File

@ -948,7 +948,7 @@ bool StorageEngineMock::inRecoveryResult = false;
StorageEngineMock::StorageEngineMock(arangodb::application_features::ApplicationServer& server) StorageEngineMock::StorageEngineMock(arangodb::application_features::ApplicationServer& server)
: StorageEngine(server, "Mock", "", : StorageEngine(server, "Mock", "",
std::unique_ptr<arangodb::IndexFactory>(new IndexFactoryMock())), std::unique_ptr<arangodb::IndexFactory>(new IndexFactoryMock())),
_releasedTick(0) { vocbaseCount(0), _releasedTick(0){
arangodb::FlushFeature::_defaultFlushSubscription = arangodb::FlushFeature::_defaultFlushSubscription =
[](std::string const&, TRI_vocbase_t const&, [](std::string const&, TRI_vocbase_t const&,
arangodb::velocypack::Slice const&) -> arangodb::Result { arangodb::velocypack::Slice const&) -> arangodb::Result {

View File

@ -16,7 +16,7 @@ const base64Encode = require('internal').base64Encode;
function testSuite() { function testSuite() {
const jwtSecret = 'haxxmann'; const jwtSecret = 'haxxmann';
const user = 'hackers@arangodb.com'; const user = 'bob';
const system = "_system"; const system = "_system";
@ -28,7 +28,8 @@ function testSuite() {
const name = "TestAuthAnalyzer"; const name = "TestAuthAnalyzer";
users.save(user, ''); // password must be empty otherwise switchUser will not work if(!users.exists('bob'))
users.save(user, ''); // password must be empty otherwise switchUser will not work
// analyzers can only be changed from the `_system` database // analyzers can only be changed from the `_system` database
// analyzer API does not support database selection via the usual `_db/<dbname>/_api/<api>` // analyzer API does not support database selection via the usual `_db/<dbname>/_api/<api>`
@ -50,11 +51,10 @@ function testSuite() {
users.grantDatabase(user, system, "ro"); users.grantDatabase(user, system, "ro");
users.grantDatabase(user, rodb, "ro"); users.grantDatabase(user, rodb, "ro");
users.grantDatabase(user, rwdb, "rw"); users.grantDatabase(user, rwdb, "rw");
users.grantCollection(user, system, "*", "none"); users.grantCollection(user, system, "*", "none");
users.grantCollection(user, rwdb, "*", "rw"); users.grantCollection(user, rwdb, "*", "rw");
users.grantCollection(user, rodb, "*", "ro"); users.grantCollection(user, rodb, "*", "ro");
users.reload(); users.reload();
}, },

View File

@ -114,7 +114,8 @@ const waitForTaskStop = () => {
describe('User Rights Management', () => { describe('User Rights Management', () => {
before(() => { before(() => {
users.save('bob'); if(!users.exists('bob'))
users.save('bob');
users.grantDatabase('bob', '_system', 'rw'); users.grantDatabase('bob', '_system', 'rw');
users.grantCollection('bob', '_system', '*', 'rw'); users.grantCollection('bob', '_system', '*', 'rw');