mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of github.com:arangodb/arangodb into devel
This commit is contained in:
commit
ae68725a5f
|
@ -27,11 +27,11 @@ They use the ful spectrum of ArangoDBs graph features. You may access them via s
|
||||||
- [AQL Graph traversals](../Aql/GraphTraversals.md) on both named and anonymous graphs
|
- [AQL Graph traversals](../Aql/GraphTraversals.md) on both named and anonymous graphs
|
||||||
- [AQL operations on named Graphs](../Aql/GraphOperations.md)
|
- [AQL operations on named Graphs](../Aql/GraphOperations.md)
|
||||||
- [AQL operations on raw vertex & edge collections](../Aql/GraphFunctions.md)
|
- [AQL operations on raw vertex & edge collections](../Aql/GraphFunctions.md)
|
||||||
- [the RESTful General Graph interface](../HttpGharial/README.md)
|
|
||||||
- [The javascript General Graph implementation, as you may use it in FOXX Services](../GeneralGraphs/README.md)
|
- [The javascript General Graph implementation, as you may use it in FOXX Services](../GeneralGraphs/README.md)
|
||||||
* [Graph Management](../GeneralGraphs/Management.md)
|
* [Graph Management](../GeneralGraphs/Management.md); creating & manipualating graph definitions; inserting, updating and deleting vertices and edges into graphs
|
||||||
* [Graph Functions](../GeneralGraphs/Functions.md)
|
* [Graph Functions](../GeneralGraphs/Functions.md) for working with edges and vertices, to analyze them and their relations
|
||||||
* [Fluent Query Interface](../GeneralGraphs/FluentAQLInterface.md)
|
* [Fluent Query Interface](../GeneralGraphs/FluentAQLInterface.md); if you like to work with graphs via a [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface)
|
||||||
|
- [the RESTful General Graph interface](../HttpGharial/README.md) used to implement graph management in client drivers
|
||||||
|
|
||||||
!SUBSUBSECTION Manipulating collections of named graphs with regular document functions
|
!SUBSUBSECTION Manipulating collections of named graphs with regular document functions
|
||||||
|
|
||||||
|
|
|
@ -67,12 +67,14 @@ static std::string StateNames[] = {
|
||||||
"instantiating plan", // PLAN_INSTANTIATION
|
"instantiating plan", // PLAN_INSTANTIATION
|
||||||
"optimizing plan", // PLAN_OPTIMIZATION
|
"optimizing plan", // PLAN_OPTIMIZATION
|
||||||
"executing", // EXECUTION
|
"executing", // EXECUTION
|
||||||
"finalizing" // FINALIZATION
|
"finalizing", // FINALIZATION
|
||||||
|
|
||||||
|
"invalid" // INVALID
|
||||||
};
|
};
|
||||||
|
|
||||||
// make sure the state strings and the actual states match
|
// make sure the state strings and the actual states match
|
||||||
static_assert(sizeof(StateNames) / sizeof(std::string) ==
|
static_assert(sizeof(StateNames) / sizeof(std::string) ==
|
||||||
static_cast<size_t>(ExecutionState::INVALID_STATE),
|
static_cast<size_t>(ExecutionState::INVALID_STATE) + 1,
|
||||||
"invalid number of ExecutionState values");
|
"invalid number of ExecutionState values");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -110,6 +110,10 @@ struct Profile {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class Query {
|
class Query {
|
||||||
|
private:
|
||||||
|
Query(Query const&) = delete;
|
||||||
|
Query& operator=(Query const&) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Query(arangodb::ApplicationV8*, bool, TRI_vocbase_t*, char const*, size_t,
|
Query(arangodb::ApplicationV8*, bool, TRI_vocbase_t*, char const*, size_t,
|
||||||
struct TRI_json_t*, struct TRI_json_t*, QueryPart);
|
struct TRI_json_t*, struct TRI_json_t*, QueryPart);
|
||||||
|
|
|
@ -201,7 +201,6 @@ void RestCursorHandler::processQuery(VPackSlice const& slice) {
|
||||||
}
|
}
|
||||||
arangodb::JsonCursor* cursor = cursors->createFromVelocyPack(
|
arangodb::JsonCursor* cursor = cursors->createFromVelocyPack(
|
||||||
builder, batchSize, extra, ttl, count, queryResult.cached);
|
builder, batchSize, extra, ttl, count, queryResult.cached);
|
||||||
queryResult.json = nullptr;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_response->body().appendChar('{');
|
_response->body().appendChar('{');
|
||||||
|
|
|
@ -1469,7 +1469,7 @@ void TRI_replication_applier_t::toVelocyPack(VPackBuilder& builder) const {
|
||||||
// add server info
|
// add server info
|
||||||
builder.add("server", VPackValue(VPackValueType::Object));
|
builder.add("server", VPackValue(VPackValueType::Object));
|
||||||
builder.add("version", VPackValue(TRI_VERSION));
|
builder.add("version", VPackValue(TRI_VERSION));
|
||||||
builder.add("serverId", VPackValue(TRI_StringUInt64(TRI_GetIdServer())));
|
builder.add("serverId", VPackValue(std::to_string(TRI_GetIdServer())));
|
||||||
builder.close(); // server
|
builder.close(); // server
|
||||||
|
|
||||||
if (config._endpoint != nullptr) {
|
if (config._endpoint != nullptr) {
|
||||||
|
|
|
@ -329,6 +329,10 @@ function readImportantLogLines(logPath) {
|
||||||
/// # and know the PID plus the process name for later use.
|
/// # and know the PID plus the process name for later use.
|
||||||
/// kernel.core_uses_pid = 1
|
/// kernel.core_uses_pid = 1
|
||||||
/// kernel.core_pattern = /var/tmp/core-%e-%p-%t
|
/// kernel.core_pattern = /var/tmp/core-%e-%p-%t
|
||||||
|
///
|
||||||
|
/// If you set coreDirectory to empty, this behavior is changed: The core file
|
||||||
|
/// expected to be named simply "core" and should exist in the current
|
||||||
|
/// directory.
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function analyzeCoreDump(instanceInfo, options, storeArangodPath, pid) {
|
function analyzeCoreDump(instanceInfo, options, storeArangodPath, pid) {
|
||||||
|
@ -340,7 +344,12 @@ function analyzeCoreDump(instanceInfo, options, storeArangodPath, pid) {
|
||||||
command += "echo quit;";
|
command += "echo quit;";
|
||||||
command += "sleep 2";
|
command += "sleep 2";
|
||||||
command += ") | gdb " + storeArangodPath + " ";
|
command += ") | gdb " + storeArangodPath + " ";
|
||||||
command += options.coreDirectory + "/*core*" + pid + '*';
|
|
||||||
|
if (options.coreDirectory === "") {
|
||||||
|
command += "core";
|
||||||
|
} else {
|
||||||
|
command += options.coreDirectory + "/*core*" + pid + '*';
|
||||||
|
}
|
||||||
|
|
||||||
const args = ['-c', command];
|
const args = ['-c', command];
|
||||||
print(JSON.stringify(args));
|
print(JSON.stringify(args));
|
||||||
|
@ -408,9 +417,12 @@ function checkInstanceAliveSingleServer(instanceInfo, options) {
|
||||||
print("Core dump written; copying arangod to " +
|
print("Core dump written; copying arangod to " +
|
||||||
instanceInfo.tmpDataDir + " for later analysis.");
|
instanceInfo.tmpDataDir + " for later analysis.");
|
||||||
|
|
||||||
|
let corePath = (options.coreDirectory === "") ?
|
||||||
|
"core" :
|
||||||
|
options.coreDirectory + "/core*" + instanceInfo.pid.pid + "*'";
|
||||||
|
|
||||||
res.gdbHint = "Run debugger with 'gdb " +
|
res.gdbHint = "Run debugger with 'gdb " +
|
||||||
storeArangodPath + " " + options.coreDirectory +
|
storeArangodPath + " " + corePath;
|
||||||
"/core*" + instanceInfo.pid.pid + "*'";
|
|
||||||
|
|
||||||
if (require("internal").platform.substr(0, 3) === 'win') {
|
if (require("internal").platform.substr(0, 3) === 'win') {
|
||||||
// Windows: wait for procdump to do its job...
|
// Windows: wait for procdump to do its job...
|
||||||
|
|
|
@ -46,17 +46,36 @@ Exception::Exception(int code, char const* file, int line)
|
||||||
_file(file),
|
_file(file),
|
||||||
_line(line),
|
_line(line),
|
||||||
_code(code) {
|
_code(code) {
|
||||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
|
||||||
#if HAVE_BACKTRACE
|
appendLocation();
|
||||||
if (WithBackTrace) {
|
|
||||||
_errorMessage += std::string("\n\n");
|
|
||||||
TRI_GetBacktrace(_errorMessage);
|
|
||||||
_errorMessage += std::string("\n\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief constructor, for creating an exception with an already created
|
||||||
|
/// error message (normally based on error templates containing %s, %d etc.)
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Exception::Exception(int code, std::string const& errorMessage,
|
||||||
|
char const* file, int line)
|
||||||
|
: _errorMessage(errorMessage), _file(file), _line(line), _code(code) {
|
||||||
|
|
||||||
|
appendLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief constructor, for creating an exception with an already created
|
||||||
|
/// error message (normally based on error templates containing %s, %d etc.)
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Exception::Exception(int code, char const* errorMessage, char const* file,
|
||||||
|
int line)
|
||||||
|
: _errorMessage(errorMessage), _file(file), _line(line), _code(code) {
|
||||||
|
|
||||||
|
appendLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
Exception::~Exception() throw() {}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief returns the error message
|
/// @brief returns the error message
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -75,52 +94,32 @@ int Exception::code() const throw() { return _code; }
|
||||||
|
|
||||||
void Exception::addToMessage(std::string const& more) { _errorMessage += more; }
|
void Exception::addToMessage(std::string const& more) { _errorMessage += more; }
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief constructor, for creating an exception with an already created
|
|
||||||
/// error message (normally based on error templates containing %s, %d etc.)
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
Exception::Exception(int code, std::string const& errorMessage,
|
|
||||||
char const* file, int line)
|
|
||||||
: _errorMessage(errorMessage), _file(file), _line(line), _code(code) {
|
|
||||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
|
||||||
#if HAVE_BACKTRACE
|
|
||||||
if (WithBackTrace) {
|
|
||||||
_errorMessage += std::string("\n\n");
|
|
||||||
TRI_GetBacktrace(_errorMessage);
|
|
||||||
_errorMessage += std::string("\n\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief constructor, for creating an exception with an already created
|
|
||||||
/// error message (normally based on error templates containing %s, %d etc.)
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
Exception::Exception(int code, char const* errorMessage, char const* file,
|
|
||||||
int line)
|
|
||||||
: _errorMessage(errorMessage), _file(file), _line(line), _code(code) {
|
|
||||||
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
|
||||||
#if HAVE_BACKTRACE
|
|
||||||
if (WithBackTrace) {
|
|
||||||
_errorMessage += std::string("\n\n");
|
|
||||||
TRI_GetBacktrace(_errorMessage);
|
|
||||||
_errorMessage += std::string("\n\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
Exception::~Exception() throw() {}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief return exception message
|
/// @brief return exception message
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
char const* Exception::what() const throw() { return _errorMessage.c_str(); }
|
char const* Exception::what() const throw() { return _errorMessage.c_str(); }
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief append original error location to message
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Exception::appendLocation () {
|
||||||
|
if (_code == TRI_ERROR_INTERNAL) {
|
||||||
|
_errorMessage += std::string(" (location: ") + _file + ":" + std::to_string(_line) + "). Please report this error to arangodb.com";
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef TRI_ENABLE_MAINTAINER_MODE
|
||||||
|
#if HAVE_BACKTRACE
|
||||||
|
if (WithBackTrace) {
|
||||||
|
_errorMessage += std::string("\n\n");
|
||||||
|
TRI_GetBacktrace(_errorMessage);
|
||||||
|
_errorMessage += std::string("\n\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief construct an error message from a template string
|
/// @brief construct an error message from a template string
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -100,6 +100,8 @@ class Exception : public virtual std::exception {
|
||||||
std::string message() const throw();
|
std::string message() const throw();
|
||||||
int code() const throw();
|
int code() const throw();
|
||||||
void addToMessage(std::string const&);
|
void addToMessage(std::string const&);
|
||||||
|
private:
|
||||||
|
void appendLocation ();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string _errorMessage;
|
std::string _errorMessage;
|
||||||
|
|
Loading…
Reference in New Issue