mirror of https://gitee.com/bigwinds/arangodb
Bug fix 3.3/pre release woes (#4084)
This commit is contained in:
parent
47bbfdc503
commit
d80daeb450
|
@ -146,6 +146,7 @@ v3.3.beta1 (2017-11-07)
|
|||
settable via the `--console.prompt` option in arangosh:
|
||||
|
||||
- '%t': current time as timestamp
|
||||
- '%a': elpased time since ArangoShell start in seconds
|
||||
- '%p': duration of last command in seconds
|
||||
- '%d': name of current database
|
||||
- '%e': current endpoint
|
||||
|
|
|
@ -83,6 +83,14 @@ void ReplicationFeature::prepare() {
|
|||
|
||||
void ReplicationFeature::start() {
|
||||
_globalReplicationApplier.reset(new GlobalReplicationApplier(GlobalReplicationApplier::loadConfiguration()));
|
||||
|
||||
try {
|
||||
_globalReplicationApplier->loadState();
|
||||
} catch (...) {
|
||||
// :snake:
|
||||
}
|
||||
|
||||
LOG_TOPIC(DEBUG, Logger::REPLICATION) << "checking global applier startup. autoStart: " << _globalReplicationApplier->autoStart() << ", hasState: " << _globalReplicationApplier->hasState();
|
||||
|
||||
if (_globalReplicationApplier->autoStart() &&
|
||||
_globalReplicationApplier->hasState() &&
|
||||
|
|
|
@ -64,7 +64,8 @@ ConsoleFeature::ConsoleFeature(application_features::ApplicationServer* server)
|
|||
_supportsColors(isatty(STDIN_FILENO) != 0),
|
||||
_toPager(stdout),
|
||||
_toAuditFile(nullptr),
|
||||
_lastDuration(0.0) {
|
||||
_lastDuration(0.0),
|
||||
_startTime(TRI_microtime()) {
|
||||
setOptional(false);
|
||||
requiresElevatedPrivileges(false);
|
||||
startsAfter("Logger");
|
||||
|
@ -422,6 +423,10 @@ ConsoleFeature::Prompt ConsoleFeature::buildPrompt(ClientFeature* client) {
|
|||
std::ostringstream tmp;
|
||||
tmp << std::setprecision(6) << std::fixed << TRI_microtime();
|
||||
result.append(tmp.str());
|
||||
} else if (c == 'a') {
|
||||
std::ostringstream tmp;
|
||||
tmp << std::setprecision(6) << std::fixed << (TRI_microtime() - _startTime);
|
||||
result.append(tmp.str());
|
||||
} else if (c == 'p') {
|
||||
std::ostringstream tmp;
|
||||
tmp << std::setprecision(6) << std::fixed << _lastDuration;
|
||||
|
|
|
@ -109,6 +109,8 @@ class ConsoleFeature final : public application_features::ApplicationFeature {
|
|||
FILE* _toAuditFile;
|
||||
// amount of time the last executed shell operation took
|
||||
double _lastDuration;
|
||||
// timestamp of startup time
|
||||
double const _startTime;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue