-
Notifications
You must be signed in to change notification settings - Fork 858
Fix invalid assertion and always remove blocker object on replication failure #14498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8efe2db
Add new chaos test suite.
mpoeter bc42613
fixes for chaos tests
jsteemann fb5877d
simplify PR
jsteemann c63ae9e
Update arangod/RocksDBEngine/RocksDBMetadata.cpp
jsteemann 9546327
Update arangod/RocksDBEngine/RocksDBMetaCollection.cpp
jsteemann d1897f8
apply review suggestion
jsteemann c2c6891
updated CHANGELOG
jsteemann ce19d5b
Merge branch '3.8' into bug-fix-3.8/fix-cluster-chaos-load-test
KVS85 87b9b1f
Merge branch '3.8' into bug-fix-3.8/fix-cluster-chaos-load-test
KVS85 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* jshint strict: false, sub: true */ | ||
/* global */ | ||
'use strict'; | ||
|
||
//////////////////////////////////////////////////////////////////////////////// | ||
/// DISCLAIMER | ||
/// | ||
/// Copyright 2014-2021 ArangoDB GmbH, Cologne, Germany | ||
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany | ||
/// | ||
/// Licensed under the Apache License, Version 2.0 (the "License") | ||
/// you may not use this file except in compliance with the License. | ||
/// You may obtain a copy of the License at | ||
/// | ||
/// http://www.apache.org/licenses/LICENSE-2.0 | ||
/// | ||
/// Unless required by applicable law or agreed to in writing, software | ||
/// distributed under the License is distributed on an "AS IS" BASIS, | ||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
/// See the License for the specific language governing permissions and | ||
/// limitations under the License. | ||
/// | ||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany | ||
/// | ||
/// @author Manuel Pöter | ||
//////////////////////////////////////////////////////////////////////////////// | ||
|
||
const functionsDocumentation = { | ||
'chaos': 'chaos tests' | ||
}; | ||
const optionsDocumentation = []; | ||
|
||
const _ = require('lodash'); | ||
const tu = require('@arangodb/testutils/test-utils'); | ||
|
||
const testPaths = { | ||
'chaos': [ tu.pathForTesting('client/chaos') ], | ||
}; | ||
|
||
function chaos (options) { | ||
let testCasesWithConfigs = {}; | ||
let testCases = tu.scanTestPaths(testPaths.chaos, options); | ||
|
||
// The chaos test suite is parameterized and each configuration runs 5min. | ||
// For the nightly tests we want to run a large number of possible parameter | ||
// combinations, but each file has a runtime limit of 15min and ATM the test | ||
// system is not designed to allow a test file to be run multiple times with | ||
// different configurations. | ||
// The hacky solution here is to build up a map of test cases with their respective | ||
// configurations and have n copies of the test file in the test case list, | ||
// where n is the number of configurations for this test. The new `preRun` | ||
// callback function is called before each testCase execution. At that point we | ||
// pop the next config from this test case's config list and set the global | ||
// variable `currentTestConfig` which is then used in the tests. | ||
// To allow the test cases to define the possible configs I introduced the | ||
// possibility to write test cases as modules. A jsunity test file that contains | ||
// "test-module-" in its filename is not executed directly, but instead must | ||
// export a "run" function that is called. Such a module can optionally define | ||
// a function "getConfigs" which must return an array of configurations. | ||
|
||
testCases = _.flatMap(testCases, testCase => { | ||
if (testCase.includes("test-module-")) { | ||
const configProvider = require(testCase).getConfigs; | ||
if (configProvider) { | ||
const configs = configProvider(); | ||
if (!Array.isArray(configs)) { | ||
throw "test case module " + testCase + " does not provide config list"; | ||
} | ||
testCasesWithConfigs[testCase] = configs; | ||
return Array(configs.length).fill(testCase); | ||
} | ||
} | ||
return testCase; | ||
}); | ||
|
||
testCases = tu.splitBuckets(options, testCases); | ||
|
||
let handlers = { | ||
preRun: (test) => { | ||
global.currentTestConfig = undefined; | ||
const configs = testCasesWithConfigs[test]; | ||
if (Array.isArray(configs)) { | ||
if (configs.length === 0) { | ||
throw "Unexpected! Have no more configs for test case " + test; | ||
} | ||
global.currentTestConfig = configs.shift(); | ||
} | ||
} | ||
}; | ||
|
||
return tu.performTests(options, testCases, 'chaos', tu.runInLocalArangosh, {}, handlers); | ||
} | ||
|
||
exports.setup = function (testFns, defaultFns, opts, fnDocs, optionsDoc, allTestPaths) { | ||
Object.assign(allTestPaths, testPaths); | ||
testFns['chaos'] = chaos; | ||
|
||
// intentionall 4E5B y not turned on by default, as the suite may take a lot of time | ||
// defaultFns.push('chaos'); | ||
|
||
for (var attrname in functionsDocumentation) { fnDocs[attrname] = functionsDocumentation[attrname]; } | ||
for (var i = 0; i < optionsDocumentation.length; i++) { optionsDoc.push(optionsDocumentation[i]); } | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.