mirror of https://gitee.com/bigwinds/arangodb
Merge branch '1.1' of github.com:triAGENS/ArangoDB into 1.1
This commit is contained in:
commit
4b17948240
|
@ -103,16 +103,6 @@ removed. Replacing will also create a new revision:
|
||||||
|
|
||||||
For more information, please check @ref RestDocument.
|
For more information, please check @ref RestDocument.
|
||||||
|
|
||||||
Blueprints API {#NewFeatures11BluePrintsAPI}
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
Blueprints is a property graph model interface with provided
|
|
||||||
implementations. Databases that implement the Blueprints interfaces
|
|
||||||
automatically support Blueprints-enabled applications
|
|
||||||
(@EXTREF{http://tinkerpop.com/,http://tinkerpop.com}).
|
|
||||||
|
|
||||||
For more information please refer to @ref HttpBlueprints.
|
|
||||||
|
|
||||||
AQL Improvements {#NewFeatures11AqlImprovements}
|
AQL Improvements {#NewFeatures11AqlImprovements}
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ TOC {#NewFeatures11TOC}
|
||||||
- @ref NewFeatures11CollectionTypes
|
- @ref NewFeatures11CollectionTypes
|
||||||
- @ref NewFeatures11BatchRequests
|
- @ref NewFeatures11BatchRequests
|
||||||
- @ref NewFeatures11PartialUpdates
|
- @ref NewFeatures11PartialUpdates
|
||||||
- @ref NewFeatures11BluePrintsAPI
|
|
||||||
- @ref NewFeatures11AqlImprovements
|
- @ref NewFeatures11AqlImprovements
|
||||||
- @ref NewFeatures11DiskSynchronisation
|
- @ref NewFeatures11DiskSynchronisation
|
||||||
- @ref NewFeatures11ServerStatistics
|
- @ref NewFeatures11ServerStatistics
|
||||||
|
|
|
@ -137,7 +137,6 @@ following command line option:
|
||||||
|
|
||||||
Of course this option can also be stored in a configuration file.
|
Of course this option can also be stored in a configuration file.
|
||||||
|
|
||||||
|
|
||||||
### HTTP keep-alive
|
### HTTP keep-alive
|
||||||
|
|
||||||
The following _arangod_ startup options have been removed in ArangoDB
|
The following _arangod_ startup options have been removed in ArangoDB
|
||||||
|
@ -261,6 +260,15 @@ interactively prompt for a password. If no username is specified on
|
||||||
the command line, the default user _root_ will be used but there will
|
the command line, the default user _root_ will be used but there will
|
||||||
still be a password prompt.
|
still be a password prompt.
|
||||||
|
|
||||||
|
Change of syslog usage
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
In 1.0, arangod always logged its output to the syslog, regardless of
|
||||||
|
any other logging that was configured. In 1.1, this has changed. Log
|
||||||
|
messages will be sent to the syslog only if the server is started with
|
||||||
|
the `--log.syslog` option and a non-empty string (the log facility)
|
||||||
|
is given to it.
|
||||||
|
|
||||||
Removed functionality
|
Removed functionality
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ void ApplicationServer::setupLogging () {
|
||||||
TRI_SetFileToLog(i->c_str());
|
TRI_SetFileToLog(i->c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NULL == TRI_CreateLogAppenderFile(_logFile)) {
|
if (NULL == TRI_CreateLogAppenderFile(_logFile.c_str())) {
|
||||||
if (_logFile.length() > 0) {
|
if (_logFile.length() > 0) {
|
||||||
// the user specified a log file to use but it could not be created. bail out
|
// the user specified a log file to use but it could not be created. bail out
|
||||||
std::cerr << "failed to create logfile " << _logFile << std::endl;
|
std::cerr << "failed to create logfile " << _logFile << std::endl;
|
||||||
|
@ -250,7 +250,9 @@ void ApplicationServer::setupLogging () {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef TRI_ENABLE_SYSLOG
|
#ifdef TRI_ENABLE_SYSLOG
|
||||||
TRI_CreateLogAppenderSyslog(_logPrefix, _logSyslog);
|
if (_logSyslog != "") {
|
||||||
|
TRI_CreateLogAppenderSyslog(_logPrefix.c_str(), _logSyslog.c_str());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1432,6 +1432,7 @@ TRI_log_appender_t* TRI_CreateLogAppenderFile (char const* filename) {
|
||||||
|
|
||||||
typedef struct log_appender_syslog_s {
|
typedef struct log_appender_syslog_s {
|
||||||
TRI_log_appender_t base;
|
TRI_log_appender_t base;
|
||||||
|
TRI_mutex_t _mutex;
|
||||||
}
|
}
|
||||||
log_appender_syslog_t;
|
log_appender_syslog_t;
|
||||||
|
|
||||||
|
@ -1462,6 +1463,7 @@ static void LogAppenderSyslog_Log (TRI_log_appender_t* appender,
|
||||||
char const* msg,
|
char const* msg,
|
||||||
size_t length) {
|
size_t length) {
|
||||||
int priority;
|
int priority;
|
||||||
|
log_appender_syslog_t* self;
|
||||||
|
|
||||||
switch (severity) {
|
switch (severity) {
|
||||||
case TRI_LOG_SEVERITY_EXCEPTION: priority = LOG_CRIT; break;
|
case TRI_LOG_SEVERITY_EXCEPTION: priority = LOG_CRIT; break;
|
||||||
|
@ -1482,7 +1484,11 @@ static void LogAppenderSyslog_Log (TRI_log_appender_t* appender,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self = (log_appender_syslog_t*) appender;
|
||||||
|
|
||||||
|
TRI_LockMutex(&self->_mutex);
|
||||||
syslog(priority, "%s", msg);
|
syslog(priority, "%s", msg);
|
||||||
|
TRI_UnlockMutex(&self->_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1520,7 +1526,12 @@ static void LogAppenderSyslog_Close (TRI_log_appender_t* appender) {
|
||||||
TRI_UnlockSpin(&AppendersLock);
|
TRI_UnlockSpin(&AppendersLock);
|
||||||
|
|
||||||
self = (log_appender_syslog_t*) appender;
|
self = (log_appender_syslog_t*) appender;
|
||||||
|
TRI_LockMutex(&self->_mutex);
|
||||||
closelog();
|
closelog();
|
||||||
|
TRI_UnlockMutex(&self->_mutex);
|
||||||
|
|
||||||
|
TRI_DestroyMutex(&self->_mutex);
|
||||||
|
|
||||||
TRI_Free(TRI_CORE_MEM_ZONE, self);
|
TRI_Free(TRI_CORE_MEM_ZONE, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1549,9 +1560,12 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name, char const* f
|
||||||
log_appender_syslog_t* appender;
|
log_appender_syslog_t* appender;
|
||||||
int value;
|
int value;
|
||||||
|
|
||||||
|
assert(facility);
|
||||||
|
assert(*facility != '\0');
|
||||||
|
|
||||||
// no logging
|
// no logging
|
||||||
if (name == NULL || *name == '\0') {
|
if (name == NULL || *name == '\0') {
|
||||||
name = "[voc]";
|
name = "[arangod]";
|
||||||
}
|
}
|
||||||
|
|
||||||
// allocate space
|
// allocate space
|
||||||
|
@ -1562,6 +1576,8 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name, char const* f
|
||||||
appender->base.reopen = LogAppenderSyslog_Reopen;
|
appender->base.reopen = LogAppenderSyslog_Reopen;
|
||||||
appender->base.close = LogAppenderSyslog_Close;
|
appender->base.close = LogAppenderSyslog_Close;
|
||||||
|
|
||||||
|
TRI_InitMutex(&appender->_mutex);
|
||||||
|
|
||||||
// find facility
|
// find facility
|
||||||
value = LOG_LOCAL0;
|
value = LOG_LOCAL0;
|
||||||
|
|
||||||
|
@ -1582,7 +1598,9 @@ TRI_log_appender_t* TRI_CreateLogAppenderSyslog (char const* name, char const* f
|
||||||
}
|
}
|
||||||
|
|
||||||
// and open logging
|
// and open logging
|
||||||
|
TRI_LockMutex(&appender->_mutex);
|
||||||
openlog(name, LOG_CONS | LOG_PID, value);
|
openlog(name, LOG_CONS | LOG_PID, value);
|
||||||
|
TRI_UnlockMutex(&appender->_mutex);
|
||||||
|
|
||||||
// and store it
|
// and store it
|
||||||
TRI_LockSpin(&AppendersLock);
|
TRI_LockSpin(&AppendersLock);
|
||||||
|
|
|
@ -85,26 +85,6 @@ void TRI_SetFileToLog (string const& file) {
|
||||||
TRI_SetFileToLog(file.c_str());
|
TRI_SetFileToLog(file.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief creates a log appender for file output
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
TRI_log_appender_t* TRI_CreateLogAppenderFile (string const& filename) {
|
|
||||||
return TRI_CreateLogAppenderFile(filename.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief creates a syslog appender
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef TRI_ENABLE_SYSLOG
|
|
||||||
|
|
||||||
TRI_log_appender_t* TRI_CreateLogAppenderSyslog (string const& name, string const& facility) {
|
|
||||||
return TRI_CreateLogAppenderSyslog(name.c_str(), facility.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @}
|
/// @}
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -782,22 +782,6 @@ void TRI_SetPrefixLogging (std::string const& prefix);
|
||||||
|
|
||||||
void TRI_SetFileToLog (std::string const& file);
|
void TRI_SetFileToLog (std::string const& file);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief creates a log appender for file output
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
TRI_log_appender_t* TRI_CreateLogAppenderFile (std::string const& filename);
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief creates a syslog appender
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef TRI_ENABLE_SYSLOG
|
|
||||||
|
|
||||||
TRI_log_appender_t* TRI_CreateLogAppenderSyslog (std::string const& name, std::string const& facility);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @}
|
/// @}
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -8,6 +8,36 @@ MODULESPATH="@PKGDATADIR@/js/server/modules;@PKGDATADIR@/js/common/modules"
|
||||||
SCRIPT="@PKGDATADIR@/js/server/arango-upgrade.js"
|
SCRIPT="@PKGDATADIR@/js/server/arango-upgrade.js"
|
||||||
UIDOPTION=""
|
UIDOPTION=""
|
||||||
UIDUSER=""
|
UIDUSER=""
|
||||||
|
WHOAMI=$(whoami)
|
||||||
|
|
||||||
|
function print_help {
|
||||||
|
echo ""
|
||||||
|
echo "usage:"
|
||||||
|
echo " $0 --database.directory <path to directory> [options]"
|
||||||
|
echo ""
|
||||||
|
echo "options:"
|
||||||
|
echo " --uid <user> change user to <user> for upgrading"
|
||||||
|
echo " --help this message"
|
||||||
|
echo ""
|
||||||
|
echo "options for developers:"
|
||||||
|
echo " --relative use arangod and javascript in current directory"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkOptions {
|
||||||
|
case "$1" in
|
||||||
|
--help)
|
||||||
|
print_help
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "unknown option: $1"
|
||||||
|
print_help
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
while [ "$#" -gt 1 ]; do
|
while [ "$#" -gt 1 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -27,13 +57,23 @@ while [ "$#" -gt 1 ]; do
|
||||||
MODULESPATH="./js/server/modules;./js/common/modules"
|
MODULESPATH="./js/server/modules;./js/common/modules"
|
||||||
SCRIPT="./js/server/arango-upgrade.js"
|
SCRIPT="./js/server/arango-upgrade.js"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
checkOptions $1
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ "$#" -gt 0 ]; then
|
||||||
|
checkOptions $1
|
||||||
|
fi
|
||||||
|
|
||||||
if test ! -d "$DATABASE"; then
|
if test ! -d "$DATABASE"; then
|
||||||
echo "$0: database directory '$DATABASE' does not exist"
|
echo "$0: database directory '$DATABASE' does not exist"
|
||||||
|
print_help
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -44,3 +84,9 @@ $ARANGOD \
|
||||||
--javascript.modules-path "$MODULESPATH" \
|
--javascript.modules-path "$MODULESPATH" \
|
||||||
$UIDOPTION $UIDUSER
|
$UIDOPTION $UIDUSER
|
||||||
|
|
||||||
|
if [ "$WHOAMI" == "abrandt" ] && [ "$UIDUSER" == "" ] ; then
|
||||||
|
echo "Warning:"
|
||||||
|
echo " $0 started without '--uid <user>' option."
|
||||||
|
echo " Change owner of database files if needed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue