8000 fixed internal issue 2102: Segfaults in arangod console when using ag… · mnemosdev/arangodb@7130217 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7130217

Browse files
authored
fixed internal issue 2102: Segfaults in arangod console when using ag… (arangodb#4874)
1 parent ffe11c6 commit 7130217

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

arangod/Cluster/v8-cluster.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ static void CreateAgencyException(
100100
static void JS_CasAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
101101
TRI_V8_TRY_CATCH_BEGIN(isolate);
102102
v8::HandleScope scope(isolate);
103+
104+
ONLY_IN_CLUSTER;
103105

104106
if (args.Length() < 3) {
105107
TRI_V8_THROW_EXCEPTION_USAGE(
@@ -161,6 +163,8 @@ static void JS_CreateDirectoryAgency(
161163
v8::FunctionCallbackInfo<v8::Value> const& args) {
162164
TRI_V8_TRY_CATCH_BEGIN(isolate);
163165
v8::HandleScope scope(isolate);
166+
167+
ONLY_IN_CLUSTER;
164168

165169
if (args.Length() != 1) {
166170
TRI_V8_THROW_EXCEPTION_USAGE("createDirectory(<key>)");
@@ -208,6 +212,8 @@ static void JS_IncreaseVersionAgency(
208212
v8::FunctionCallbackInfo<v8::Value> const& args) {
209213
TRI_V8_TRY_CATCH_BEGIN(isolate)
210214
v8::HandleScope scope(isolate);
215+
216+
ONLY_IN_CLUSTER;
211217

212218
if (args.Length() != 1) {
213219
TRI_V8_THROW_EXCEPTION_USAGE("increaseVersion(<key>)");
@@ -232,6 +238,8 @@ static void JS_IncreaseVersionAgency(
232238
static void JS_GetAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
233239
TRI_V8_TRY_CATCH_BEGIN(isolate)
234240
v8::HandleScope scope(isolate);
241+
242+
ONLY_IN_CLUSTER;
235243

236244
if (args.Length() < 1) {
237245
TRI_V8_THROW_EXCEPTION_USAGE("get(<key>)");
@@ -272,6 +280,8 @@ static void JS_APIAgency(std::string const& envelope,
272280
v8::FunctionCallbackInfo<v8::Value> const& args) {
273281
TRI_V8_TRY_CATCH_BEGIN(isolate)
274282
v8::HandleScope scope(isolate);
283+
284+
ONLY_IN_CLUSTER;
275285

276286
if (args.Length() < 1) {
277287
TRI_V8_THROW_EXCEPTION_USAGE(std::string(envelope) + "([[...]])");
@@ -336,6 +346,8 @@ static void JS_TransactAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
336346
static void JS_RemoveAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
337347
TRI_V8_TRY_CATCH_BEGIN(isolate);
338348
v8::HandleScope scope(isolate);
349+
350+
ONLY_IN_CLUSTER;
339351

340352
if (args.Length() < 1) {
341353
TRI_V8_THROW_EXCEPTION_USAGE("remove(<key>, <recursive>)");
@@ -366,6 +378,8 @@ static void JS_RemoveAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
366378
static void JS_SetAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
367379
TRI_V8_TRY_CATCH_BEGIN(isolate);
368380
v8::HandleScope scope(isolate);
381+
382+
ONLY_IN_CLUSTER;
369383

370384
if (args.Length() < 2) {
371385
TRI_V8_THROW_EXCEPTION_USAGE("set(<key>, <value>, <ttl>)");
@@ -403,6 +417,8 @@ static void JS_SetAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
403417
static void JS_Agency(v8::FunctionCallbackInfo<v8::Value> const& args) {
404418
TRI_V8_TRY_CATCH_BEGIN(isolate)
405419
v8::HandleScope scope(isolate);
420+
421+
ONLY_IN_CLUSTER;
406422

407423
if (args.Length() > 0) {
408424
TRI_V8_THROW_EXCEPTION_USAGE("agency()");
@@ -453,6 +469,8 @@ static void JS_EndpointsAgency(
453469
v8::FunctionCallbackInfo<v8::Value> const& args) {
454470
TRI_V8_TRY_CATCH_BEGIN(isolate);
455471
v8::HandleScope scope(isolate);
472+
473+
ONLY_IN_CLUSTER;
456474

457475
if (args.Length() != 0) {
458476
TRI_V8_THROW_EXCEPTION_USAGE("endpoints()");
@@ -483,7 +501,7 @@ static void JS_EndpointsAgency(
483501
static void JS_PrefixAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
484502
TRI_V8_TRY_CATCH_BEGIN(isolate);
485503
v8::HandleScope scope(isolate);
486-
504+
487505
std::string const prefix = AgencyCommManager::path();
488506

489507
TRI_V8_RETURN_STD_STRING(prefix);
@@ -497,6 +515,8 @@ static void JS_PrefixAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
497515
static void JS_UniqidAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
498516
TRI_V8_TRY_CATCH_BEGIN(isolate);
499517
v8::HandleScope scope(isolate);
518+
519+
ONLY_IN_CLUSTER;
500520

501521
if (args.Length() > 2) {
502522
TRI_V8_THROW_EXCEPTION_USAGE("uniqid(<count>, <timeout>)");
@@ -532,6 +552,8 @@ static void JS_UniqidAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
532552
static void JS_VersionAgency(v8::FunctionCallbackInfo<v8::Value> const& args) {
533553
TRI_V8_TRY_CATCH_BEGIN(isolate);
534554
v8::HandleScope scope(isolate);
555+
556+
ONLY_IN_CLUSTER;
535557

536558
if (args.Length() != 0) {
537559
TRI_V8_THROW_EXCEPTION_USAGE("version()");

0 commit comments

Comments
 (0)
0