mirror of https://gitee.com/bigwinds/arangodb
minimum number of V8 contexts in console mode must be 2, not 1 (#3397)
this is required to ensure the console gets one dedicated V8 context and all other operations have at least one extra context. This requirement was not enforced anymore.
This commit is contained in:
parent
41b9f1e146
commit
4174cd20b9
|
@ -1,6 +1,11 @@
|
|||
devel
|
||||
-----
|
||||
|
||||
* minimum number of V8 contexts in console mode must be 2, not 1. this is
|
||||
required to ensure the console gets one dedicated V8 context and all other
|
||||
operations have at least one extra context. This requirement was not enforced
|
||||
anymore.
|
||||
|
||||
* UI: fixed wrong user attribute name validation, issue #3228
|
||||
|
||||
* make AQL return a proper error message in case of a unique key constraint
|
||||
|
|
|
@ -227,7 +227,11 @@ void V8DealerFeature::start() {
|
|||
|
||||
// set singleton
|
||||
DEALER = this;
|
||||
|
||||
|
||||
if (_nrMinContexts < 1) {
|
||||
_nrMinContexts = 1;
|
||||
}
|
||||
|
||||
// try to guess a suitable number of contexts
|
||||
if (0 == _nrMaxContexts && 0 == _forceNrContexts) {
|
||||
SchedulerFeature* scheduler =
|
||||
|
@ -240,12 +244,9 @@ void V8DealerFeature::start() {
|
|||
_nrMaxContexts = _forceNrContexts;
|
||||
}
|
||||
|
||||
if (_nrMinContexts < 1) {
|
||||
_nrMinContexts = 1;
|
||||
}
|
||||
|
||||
if (_nrMinContexts > _nrMaxContexts) {
|
||||
_nrMinContexts = _nrMaxContexts;
|
||||
// max contexts must not be lower than min contexts
|
||||
_nrMaxContexts = _nrMinContexts;
|
||||
}
|
||||
|
||||
LOG_TOPIC(DEBUG, Logger::V8) << "number of V8 contexts: min: " << _nrMinContexts << ", max: " << _nrMaxContexts;
|
||||
|
|
|
@ -104,8 +104,10 @@ class V8DealerFeature final : public application_features::ApplicationFeature {
|
|||
TRI_vocbase_t*);
|
||||
|
||||
void setMinimumContexts(size_t nr) {
|
||||
if (_nrMinContexts < nr) {
|
||||
_nrMinContexts = nr;
|
||||
_nrMinContexts = nr;
|
||||
// max contexts must not be lower than min contexts
|
||||
if (_nrMinContexts > _nrMaxContexts) {
|
||||
_nrMaxContexts = nr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue