mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'spdvpk' of ssh://github.com/ArangoDB/ArangoDB into spdvpk
This commit is contained in:
commit
929c50d6dd
|
@ -29,7 +29,6 @@
|
||||||
|
|
||||||
#include "arangod/VocBase/datafile.h"
|
#include "arangod/VocBase/datafile.h"
|
||||||
#include "arangod/VocBase/document-collection.h"
|
#include "arangod/VocBase/document-collection.h"
|
||||||
#include "arangod/VocBase/VocShaper.h"
|
|
||||||
#include "arangod/Wal/Marker.h"
|
#include "arangod/Wal/Marker.h"
|
||||||
|
|
||||||
template<typename T, typename U> size_t offsetOf (U T::*member) {
|
template<typename T, typename U> size_t offsetOf (U T::*member) {
|
||||||
|
|
|
@ -308,6 +308,7 @@ void DocumentAccessor::lookupDocumentAttribute(char const* name,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (name[1] == 'r' && nameLength == 4 &&
|
if (name[1] == 'r' && nameLength == 4 &&
|
||||||
memcmp(name, TRI_VOC_ATTRIBUTE_REV, nameLength) == 0) {
|
memcmp(name, TRI_VOC_ATTRIBUTE_REV, nameLength) == 0) {
|
||||||
// _rev
|
// _rev
|
||||||
|
@ -322,6 +323,7 @@ void DocumentAccessor::lookupDocumentAttribute(char const* name,
|
||||||
_current = _json.get();
|
_current = _json.get();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// TODO
|
// TODO
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "Basics/JsonHelper.h"
|
#include "Basics/JsonHelper.h"
|
||||||
#include "Utils/Transaction.h"
|
#include "Utils/Transaction.h"
|
||||||
#include "VocBase/document-collection.h"
|
#include "VocBase/document-collection.h"
|
||||||
#include "VocBase/Shaper.h"
|
|
||||||
#include "Wal/Marker.h"
|
#include "Wal/Marker.h"
|
||||||
|
|
||||||
#include <velocypack/Options.h>
|
#include <velocypack/Options.h>
|
||||||
|
@ -123,37 +122,4 @@ static inline std::string TRI_EXTRACT_MARKER_KEY(arangodb::Transaction* trx,
|
||||||
trx, static_cast<TRI_df_marker_t const*>(mptr->getDataPtr()));
|
trx, static_cast<TRI_df_marker_t const*>(mptr->getDataPtr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief extracts the revision id from a marker
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(
|
|
||||||
arangodb::Transaction*, TRI_df_marker_t const* marker) {
|
|
||||||
#if 0
|
|
||||||
if (marker->_type == TRI_WAL_MARKER_VPACK_DOCUMENT) {
|
|
||||||
auto b = reinterpret_cast<char const*>(marker) +
|
|
||||||
sizeof(arangodb::wal::vpack_document_marker_t);
|
|
||||||
VPackSlice slice(reinterpret_cast<uint8_t const*>(b));
|
|
||||||
VPackSlice value = slice.get(TRI_VOC_ATTRIBUTE_REV);
|
|
||||||
return arangodb::velocypack::readUInt64(value.start() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
|
||||||
// invalid marker type
|
|
||||||
TRI_ASSERT(false);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief extracts the revision id from a master pointer
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(arangodb::Transaction* trx,
|
|
||||||
TRI_doc_mptr_t const* mptr) {
|
|
||||||
return TRI_EXTRACT_MARKER_RID(
|
|
||||||
trx, static_cast<TRI_df_marker_t const*>(mptr->getDataPtr()));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// DISCLAIMER
|
|
||||||
///
|
|
||||||
/// Copyright 2014-2016 ArangoDB GmbH, Cologne, Germany
|
|
||||||
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
|
|
||||||
///
|
|
||||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
/// you may not use this file except in compliance with the License.
|
|
||||||
/// You may obtain a copy of the License at
|
|
||||||
///
|
|
||||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
///
|
|
||||||
/// Unless required by applicable law or agreed to in writing, software
|
|
||||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
/// See the License for the specific language governing permissions and
|
|
||||||
/// limitations under the License.
|
|
||||||
///
|
|
||||||
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
|
|
||||||
///
|
|
||||||
/// @author Dr. Frank Celler
|
|
||||||
/// @author Martin Schoenert
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifndef ARANGOD_VOC_BASE_SHAPER_H
|
|
||||||
#define ARANGOD_VOC_BASE_SHAPER_H 1
|
|
||||||
|
|
||||||
#include "Basics/Common.h"
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief json shaper
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class Shaper {
|
|
||||||
public:
|
|
||||||
Shaper(Shaper const&) = delete;
|
|
||||||
Shaper& operator=(Shaper const&) = delete;
|
|
||||||
Shaper() {}
|
|
||||||
virtual ~Shaper() {}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -25,7 +25,6 @@
|
||||||
#define ARANGOD_VOC_BASE_DOCUMENT_COLLECTION_H 1
|
#define ARANGOD_VOC_BASE_DOCUMENT_COLLECTION_H 1
|
||||||
|
|
||||||
#include "Basics/Common.h"
|
#include "Basics/Common.h"
|
||||||
#include "Basics/fasthash.h"
|
|
||||||
#include "Basics/ReadWriteLock.h"
|
#include "Basics/ReadWriteLock.h"
|
||||||
#include "Cluster/ClusterInfo.h"
|
#include "Cluster/ClusterInfo.h"
|
||||||
#include "VocBase/collection.h"
|
#include "VocBase/collection.h"
|
||||||
|
@ -39,7 +38,6 @@
|
||||||
|
|
||||||
namespace arangodb {
|
namespace arangodb {
|
||||||
class EdgeIndex;
|
class EdgeIndex;
|
||||||
class ExampleMatcher;
|
|
||||||
class Index;
|
class Index;
|
||||||
class KeyGenerator;
|
class KeyGenerator;
|
||||||
class OperationOptions;
|
class OperationOptions;
|
||||||
|
@ -456,28 +454,6 @@ static inline TRI_voc_cid_t TRI_EXTRACT_MARKER_TO_CID(
|
||||||
return TRI_EXTRACT_MARKER_TO_CID(marker);
|
return TRI_EXTRACT_MARKER_TO_CID(marker);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief extracts the revision id from a marker
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(
|
|
||||||
TRI_df_marker_t const* marker) {
|
|
||||||
// invalid marker type
|
|
||||||
TRI_ASSERT(false);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
/// @brief extracts the revision id from a master pointer
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
static inline TRI_voc_rid_t TRI_EXTRACT_MARKER_RID(TRI_doc_mptr_t const* mptr) {
|
|
||||||
TRI_df_marker_t const* marker =
|
|
||||||
static_cast<TRI_df_marker_t const*>(mptr->getDataPtr());
|
|
||||||
return TRI_EXTRACT_MARKER_RID(marker);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief extracts the pointer to the key from a marker
|
/// @brief extracts the pointer to the key from a marker
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -314,7 +314,7 @@ struct TRI_vocbase_t {
|
||||||
/// in this enum for compatibility with earlier versions
|
/// in this enum for compatibility with earlier versions
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
typedef enum {
|
enum TRI_vocbase_col_status_e {
|
||||||
TRI_VOC_COL_STATUS_CORRUPTED = 0,
|
TRI_VOC_COL_STATUS_CORRUPTED = 0,
|
||||||
TRI_VOC_COL_STATUS_NEW_BORN = 1, // DEPRECATED, and shouldn't be used anymore
|
TRI_VOC_COL_STATUS_NEW_BORN = 1, // DEPRECATED, and shouldn't be used anymore
|
||||||
TRI_VOC_COL_STATUS_UNLOADED = 2,
|
TRI_VOC_COL_STATUS_UNLOADED = 2,
|
||||||
|
@ -322,7 +322,7 @@ typedef enum {
|
||||||
TRI_VOC_COL_STATUS_UNLOADING = 4,
|
TRI_VOC_COL_STATUS_UNLOADING = 4,
|
||||||
TRI_VOC_COL_STATUS_DELETED = 5,
|
TRI_VOC_COL_STATUS_DELETED = 5,
|
||||||
TRI_VOC_COL_STATUS_LOADING = 6
|
TRI_VOC_COL_STATUS_LOADING = 6
|
||||||
} TRI_vocbase_col_status_e;
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief collection container
|
/// @brief collection container
|
||||||
|
|
|
@ -39,7 +39,8 @@ const functionsDocumentation = {
|
||||||
"dfdb": "start test",
|
"dfdb": "start test",
|
||||||
"foxx_manager": "foxx manager tests",
|
"foxx_manager": "foxx manager tests",
|
||||||
"http_replication": "http replication tests",
|
"http_replication": "http replication tests",
|
||||||
"http_server": "http server tests",
|
"http_server": "http server tests in Ruby",
|
||||||
|
"server_http" : "http server tests in Mocha",
|
||||||
"importing": "import tests",
|
"importing": "import tests",
|
||||||
"recovery": "run recovery tests",
|
"recovery": "run recovery tests",
|
||||||
"replication_ongoing": "replication ongoing tests",
|
"replication_ongoing": "replication ongoing tests",
|
||||||
|
@ -1982,6 +1983,14 @@ function findTests() {
|
||||||
return fs.join(makePathUnix("js/server/perftests"), x);
|
return fs.join(makePathUnix("js/server/perftests"), x);
|
||||||
}).sort();
|
}).sort();
|
||||||
|
|
||||||
|
testsCases.server_http = _.filter(fs.list(makePathUnix("js/common/tests/http")),
|
||||||
|
function(p) {
|
||||||
|
return p.substr(-3) === ".js";
|
||||||
|
}).map(
|
||||||
|
function(x) {
|
||||||
|
return fs.join(makePathUnix("js/common/tests/http"), x);
|
||||||
|
}).sort();
|
||||||
|
|
||||||
testsCases.replication = _.filter(fs.list(makePathUnix("js/common/tests/replication")),
|
testsCases.replication = _.filter(fs.list(makePathUnix("js/common/tests/replication")),
|
||||||
function(p) {
|
function(p) {
|
||||||
return p.substr(-3) === ".js";
|
return p.substr(-3) === ".js";
|
||||||
|
@ -2095,6 +2104,7 @@ let allTests = [
|
||||||
"dfdb",
|
"dfdb",
|
||||||
"http_server",
|
"http_server",
|
||||||
"importing",
|
"importing",
|
||||||
|
"server_http",
|
||||||
"shell_client",
|
"shell_client",
|
||||||
"shell_server",
|
"shell_server",
|
||||||
"shell_server_aql",
|
"shell_server_aql",
|
||||||
|
@ -2983,7 +2993,7 @@ testFuncs.foxx_manager = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: http replication
|
/// @brief TEST: http_replication
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.http_replication = function(options) {
|
testFuncs.http_replication = function(options) {
|
||||||
|
@ -2996,7 +3006,7 @@ testFuncs.http_replication = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: http server
|
/// @brief TEST: http_server
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.http_server = function(options) {
|
testFuncs.http_server = function(options) {
|
||||||
|
@ -3482,7 +3492,7 @@ testFuncs.shell_replication = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: shell client
|
/// @brief TEST: shell_client
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.shell_client = function(options) {
|
testFuncs.shell_client = function(options) {
|
||||||
|
@ -3556,7 +3566,17 @@ testFuncs.shell_client = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: shell server
|
/// @brief TEST: shell_http
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
testFuncs.server_http = function(options) {
|
||||||
|
findTests();
|
||||||
|
|
||||||
|
return performTests(options, testsCases.server_http, 'server_http');
|
||||||
|
};
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// @brief TEST: shell_server
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.shell_server = function(options) {
|
testFuncs.shell_server = function(options) {
|
||||||
|
@ -3566,7 +3586,7 @@ testFuncs.shell_server = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: shell server aql
|
/// @brief TEST: shell_server_aql
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.shell_server_aql = function(options) {
|
testFuncs.shell_server_aql = function(options) {
|
||||||
|
@ -3592,7 +3612,7 @@ testFuncs.shell_server_aql = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: shell server only
|
/// @brief TEST: shell_server_only
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.shell_server_only = function(options) {
|
testFuncs.shell_server_only = function(options) {
|
||||||
|
@ -3602,7 +3622,7 @@ testFuncs.shell_server_only = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: shell server performance
|
/// @brief TEST: shell_server_perf
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.shell_server_perf = function(options) {
|
testFuncs.shell_server_perf = function(options) {
|
||||||
|
@ -3613,7 +3633,7 @@ testFuncs.shell_server_perf = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: single client
|
/// @brief TEST: single_client
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
function single_usage(testsuite, list) {
|
function single_usage(testsuite, list) {
|
||||||
|
@ -3685,7 +3705,7 @@ testFuncs.single_client = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: single server
|
/// @brief TEST: single_server
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.single_server = function(options) {
|
testFuncs.single_server = function(options) {
|
||||||
|
@ -3743,7 +3763,7 @@ testFuncs.single_server = function(options) {
|
||||||
};
|
};
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief TEST: https server
|
/// @brief TEST: ssl_server
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
testFuncs.ssl_server = function(options) {
|
testFuncs.ssl_server = function(options) {
|
||||||
|
|
Loading…
Reference in New Issue