8000 Merge branch 'devel' of https://github.com/arangodb/arangodb into devel · msand/arangodb@32a268c · GitHub
[go: up one dir, main page]

Skip to content

Commit 32a268c

Browse files
committed
Merge branch 'devel' of https://github.com/arangodb/arangodb into devel
2 parents 9e95910 + 979682b commit 32a268c

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

arangod/VocBase/collection.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,12 @@ TRI_collection_t* TRI_OpenCollection (TRI_vocbase_t* vocbase,
16431643

16441644
TRI_FreeCollectionInfoOptions(&info);
16451645

1646+
double start = TRI_microtime();
1647+
1648+
LOG_ACTION("open-collection { collection: %s/%s }",
1649+
vocbase->_name,
1650+
collection->_info._name);
1651+
16461652
// check for journals and datafiles
16471653
bool ok = CheckCollection(collection, ignoreErrors);
16481654

@@ -1656,6 +1662,11 @@ TRI_collection_t* TRI_OpenCollection (TRI_vocbase_t* vocbase,
16561662

16571663
return nullptr;
16581664
}
1665+
1666+
LOG_TIMER((TRI_microtime() - start),
1667+
"open-collection { collection: %s/%s }",
1668+
vocbase->_name,
1669+
collection->_info._name);
16591670

16601671
return collection;
16611672
}

js/client/modules/org/arangodb/foxx/manager.js

Lines changed: 30 addition 8000 s & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ var help = function () {
150150
"available" : "lists all Foxx applications available in the local repository",
151151
"configuration" : "request the configuration information for the given mountpoint",
152152
"configure" : "sets the configuration for the given mountpoint",
153+
"updateDeps" : "links the dependencies in manifest to a mountpoint",
153154
"dependencies" : "request the dependencies information for the given mountpoint",
154155
"development" : "activates development mode for the given mountpoint",
155156
"help" : "shows this help",
@@ -477,7 +478,28 @@ var configuration = function(mount) {
477478
arangosh.checkRequestResult(res);
478479
return res;
479480
};
481+
////////////////////////////////////////////////////////////////////////////////
482+
/// @brief Link Dependencies to the installed mountpoint the app at the mountpoint
483+
////////////////////////////////////////////////////////////////////////////////
480484

485+
var updateDeps = function(mount, options) {
486+
checkParameter(
487+
"update(<mount>)",
488+
[ [ "Mount path", "string" ] ],
489+
[ mount ] );
490+
utils.validateMount(mount);
491+
var req = {
492+
mount: mount,
493+
options: options
494+
};
495+
var res = arango.POST("/_admin/foxx/updateDeps", JSON.stringify(req));
496+
arangosh.checkRequestResult(res);
497+
return {
498+
name: res.name,
499+
version: res.version,
500+
mount: res.mount
501+
};
502+
};
481503
////////////////////////////////////////////////////////////////////////////////
482504
/// @brief Configure the dependencies of the app at the mountpoint
483505
////////////////////////////////////////////////////////////////////////////////
@@ -668,6 +690,14 @@ var run = function (args) {
668690
res = configuration(args[1]);
669691
printf("Configuration options:\n%s\n", JSON.stringify(res, undefined, 2));
670692
break;
693+
case "updateDeps":
694+
options = extractOptions(args).configuration || {};
695+
res = updateDeps(args[1], options);
696+
printf("Reconfigured Application %s version %s on mount point %s\n",
697+
res.name,
698+
res.version,
699+
res.mount);
700+
break;
671701
case "set-dependencies":
672702
options = extractOptions(args).configuration || {};
673703
res = setDependencies(args[1], options);

0 commit comments

Comments
 (0)
0