From 267f0796d62043fca8c94d9900b517a4d80b987e Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 6 Apr 2017 15:26:32 +0200 Subject: [PATCH 01/11] fix detection of partial cmake configure --- Installation/Jenkins/build.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Installation/Jenkins/build.sh b/Installation/Jenkins/build.sh index dc87c6516b..a95e15b5a9 100755 --- a/Installation/Jenkins/build.sh +++ b/Installation/Jenkins/build.sh @@ -6,6 +6,10 @@ if python -c "import sys ; sys.exit(sys.platform != 'cygwin')"; then exit 1 fi +isCygwin=0 +if test "`uname -o||true`" == "Cygwin"; then + isCygwin=1 +fi # debian mac for f in /usr/bin/md5sum /sbin/md5; do @@ -190,7 +194,6 @@ esac CLEAN_IT=0 - while [ $# -gt 0 ]; do case "$1" in --clang) @@ -330,7 +333,7 @@ while [ $# -gt 0 ]; do --targetDir) shift TARGET_DIR=$1 - if test "`uname -o||true`" == "Cygwin"; then + if test "${isCygwin}" == 1; then CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DPACKAGE_TARGET_DIR=`cygpath --windows $1`" else CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DPACKAGE_TARGET_DIR=$1" @@ -577,7 +580,16 @@ cd ${BUILD_DIR} DST=`pwd` SOURCE_DIR=`compute_relative ${DST}/ ${SRC}/` -if [ ! -f Makefile -o ! -f CMakeCache.txt -o ! -f ALL_BUILD.vcxproj ]; then +set +e +if test "${isCygwin}" == 0; then + test ! -f Makefile -o ! -f CMakeCache.txt +else + test ! -f ALL_BUILD.vcxproj ! -f CMakeCache.txt +fi +PARTIAL_STATE=$? +set -e + +if test "${PARTIAL_STATE}" == 0; then rm -rf CMakeFiles CMakeCache.txt CMakeCPackOptions.cmake cmake_install.cmake CPackConfig.cmake CPackSourceConfig.cmake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \ cmake ${SOURCE_DIR} ${CONFIGURE_OPTIONS} -G "${GENERATOR}" || exit 1 @@ -646,7 +658,7 @@ if test -n "${TARGET_DIR}"; then (cd ${SOURCE_DIR}/enterprise; tar -u -f ${TARFILE_TMP} js) fi - if test "`uname -o||true`" == "Cygwin"; then + if test "${isCygwin}" == 1; then SSLDIR=`grep FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL CMakeCache.txt | sed 's/\r//' |sed -e "s/.*optimized;//" -e "s/;.*//" -e "s;/lib.*lib;;" -e "s;\([a-zA-Z]*\):;/cygdrive/\1;"` DLLS=`find ${SSLDIR} -name \*.dll |grep -i release` cp ${DLLS} bin/${BUILD_CONFIG} From cdcff0c9f116350da49bb64bb2d33646e2fea43c Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 6 Apr 2017 15:32:23 +0200 Subject: [PATCH 02/11] fix detection of partial cmake configure --- Installation/Jenkins/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/Jenkins/build.sh b/Installation/Jenkins/build.sh index a95e15b5a9..d3859d5c44 100755 --- a/Installation/Jenkins/build.sh +++ b/Installation/Jenkins/build.sh @@ -584,7 +584,7 @@ set +e if test "${isCygwin}" == 0; then test ! -f Makefile -o ! -f CMakeCache.txt else - test ! -f ALL_BUILD.vcxproj ! -f CMakeCache.txt + test ! -f ALL_BUILD.vcxproj -o ! -f CMakeCache.txt fi PARTIAL_STATE=$? set -e From 22b46ac3eede202f20b1a0f3649a7f80f1913d89 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 6 Apr 2017 15:54:22 +0200 Subject: [PATCH 03/11] fix enterprise branch detection so it doesn't trigger a full recompile --- Installation/Jenkins/build.sh | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Installation/Jenkins/build.sh b/Installation/Jenkins/build.sh index d3859d5c44..f326c64e6e 100755 --- a/Installation/Jenkins/build.sh +++ b/Installation/Jenkins/build.sh @@ -569,7 +569,30 @@ if test -n "${ENTERPRISE_GIT_URL}" ; then if test ! -d enterprise; then git clone ${ENTERPRISE_GIT_URL} enterprise fi - (cd enterprise; git checkout master; git fetch --tags; git pull --all; git checkout ${GITARGS}; ${FINAL_PULL} ) + ( + cd enterprise; + EP_GITSHA=`git log -n1 --pretty='%h'` + if git describe --exact-match --tags ${EP_GITSHA}; then + EP_GITARGS=`git describe --exact-match --tags ${EP_GITSHA}` + echo "I'm on tag: ${GITARGS}" + else + EP_GITARGS=`git branch --no-color| grep '^\*' | sed "s;\* *;;"` + if echo $EP_GITARGS |grep -q ' '; then + EP_GITARGS=devel + fi + echo "I'm on Branch: ${GITARGS}" + fi + + if test "${EP_GITARGS}" != "${GITARGS}"; then + git checkout master; + fi + git fetch --tags; + git pull --all; + if test "${EP_GITARGS}" != "${GITARGS}"; then + git checkout ${GITARGS}; + fi + ${FINAL_PULL} + ) fi From b7bd1d9e5985532ea5003d65dbf49c6e9fbf63f6 Mon Sep 17 00:00:00 2001 From: Jan Christoph Uhde Date: Thu, 6 Apr 2017 17:31:21 +0200 Subject: [PATCH 04/11] fix shell-foxx-manager-nightly-spec.js --- js/client/modules/@arangodb/foxx/manager.js | 1 + js/common/test-data/apps/minimal-working-setup/manifest.json | 3 +++ 2 files changed, 4 insertions(+) diff --git a/js/client/modules/@arangodb/foxx/manager.js b/js/client/modules/@arangodb/foxx/manager.js index 762160370a..0749fa4621 100644 --- a/js/client/modules/@arangodb/foxx/manager.js +++ b/js/client/modules/@arangodb/foxx/manager.js @@ -327,6 +327,7 @@ var replace = function (serviceInfo, mount, options) { }; res = arango.POST('/_admin/foxx/replace', JSON.stringify(req)); + arangodb.db._flushCache(); arangosh.checkRequestResult(res); return { name: res.name, diff --git a/js/common/test-data/apps/minimal-working-setup/manifest.json b/js/common/test-data/apps/minimal-working-setup/manifest.json index cd71e5c542..ec6ea4b421 100644 --- a/js/common/test-data/apps/minimal-working-setup/manifest.json +++ b/js/common/test-data/apps/minimal-working-setup/manifest.json @@ -3,5 +3,8 @@ "version": "0.0.0", "scripts": { "setup": "setup.js" + }, + "engines": { + "arangodb": "^2.8.0" } } From 2da0e41466e9e8a0510de1b925560e5c71e6d746 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 6 Apr 2017 18:57:19 +0200 Subject: [PATCH 05/11] add detection for cygwin/ssh ttys --- lib/Basics/operating-system.h | 2 +- lib/Basics/win-utils.cpp | 48 +++++++++++++++++++++++++++++++++++ lib/Basics/win-utils.h | 8 +++++- 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/lib/Basics/operating-system.h b/lib/Basics/operating-system.h index 26935a42e0..d5ab1cef11 100644 --- a/lib/Basics/operating-system.h +++ b/lib/Basics/operating-system.h @@ -744,7 +744,7 @@ #define fileno _fileno #define fsync _commit -#define isatty _isatty +#define isatty _cyg_isatty #define putenv _putenv #define sleep TRI_sleep #define tzset _tzset diff --git a/lib/Basics/win-utils.cpp b/lib/Basics/win-utils.cpp index fcc84a0f7c..4d48164587 100644 --- a/lib/Basics/win-utils.cpp +++ b/lib/Basics/win-utils.cpp @@ -605,3 +605,51 @@ void ADB_WindowsExitFunction(int exitCode, void* data) { exit(exitCode); } + +// Detect cygwin ssh / terminals +int +_cyg_isatty (int fd) +{ + // detect standard windows ttys: + if (_isatty (fd)) { + return 1; + } + + HANDLE fh; + + char buff[sizeof(FILE_NAME_INFO) + sizeof(WCHAR)*MAX_PATH]; + FILE_NAME_INFO *FileInformation = (FILE_NAME_INFO*) buff; + + /* get the HANDLE for the filedescriptor. */ + fh = (HANDLE) _get_osfhandle (fd); + if (!fh || fh == INVALID_HANDLE_VALUE) { + return 0; + } + + /* Cygwin consoles are pipes. If its not, no reason to continue: */ + if (GetFileType (fh) != FILE_TYPE_PIPE) { + return 0; + } + + if (!GetFileInformationByHandleEx(fh, FileNameInfo, + FileInformation, sizeof(buff))) { + return 0; + } + + // we expect something along the lines of: \cygwin-0eb90a57d5759b7b-pty3-to-master?? - if we find it its a tty. + PWCHAR cp = (PWCHAR) FileInformation->FileName; + if (!wcsncmp (cp, L"\\cygwin-", 8) + && !wcsncmp (cp + 24, L"-pty", 4)) { + cp = wcschr (cp + 28, '-'); + if (!cp) { + return 0; + } + + if (!wcsncmp (cp, L"-from-master", sizeof("-from-master") - 1) || + !wcsncmp (cp, L"-to-master", sizeof("-to-master") -1)) { + return 1; + } + } + errno = EINVAL; + return 0; +} diff --git a/lib/Basics/win-utils.h b/lib/Basics/win-utils.h index e58d6e2990..b5601fd2c2 100644 --- a/lib/Basics/win-utils.h +++ b/lib/Basics/win-utils.h @@ -130,9 +130,15 @@ void TRI_LogWindowsEventlog(char const* func, char const* file, int line, void TRI_WindowsEmergencyLog(char const* func, char const* file, int line, char const* fmt, ...); -#define LOG_FATAL_WINDOWS(...) \ +#define LOG_FATAL_WINDOWS(...) \ do { \ TRI_WindowsEmergencyLog(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) + +//////////////////////////////////////////////////////////////////////////////// +/// @brief detects whether an FD is connected to a (cygwin-)tty. +//////////////////////////////////////////////////////////////////////////////// +int _cyg_isatty (int fd); + #endif From 4e09b4f8d7ff42a71ea5901f362c4340414b21f8 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 7 Apr 2017 10:40:25 +0200 Subject: [PATCH 06/11] improved error messages --- arangosh/Benchmark/BenchFeature.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arangosh/Benchmark/BenchFeature.cpp b/arangosh/Benchmark/BenchFeature.cpp index 96b361c3eb..7c59ca0e1c 100644 --- a/arangosh/Benchmark/BenchFeature.cpp +++ b/arangosh/Benchmark/BenchFeature.cpp @@ -299,7 +299,7 @@ void BenchFeature::start() { report(client, results); if (!ok) { - std::cout << "At least one of the runs yielded some failures!" << std::endl; + std::cout << "At least one of the runs produced failures!" << std::endl; } benchmark->tearDown(); @@ -432,11 +432,10 @@ void BenchFeature::printResult(BenchRunResult const& result) { << std::endl; if (result.failures > 0) { - LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "WARNING: " << result.failures - << " arangobench request(s) failed!"; + LOG_TOPIC(WARN, arangodb::Logger::FIXME) << result.failures << " arangobench request(s) failed!"; } if (result.incomplete > 0) { - LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "WARNING: " << result.incomplete + LOG_TOPIC(WARN, arangodb::Logger::FIXME) << result.incomplete << " arangobench requests with incomplete results!"; } } From 6bb187e88a32597629d7c8967019a1d91c5a0304 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Fri, 7 Apr 2017 10:43:02 +0200 Subject: [PATCH 07/11] add some bits about linux coredumps --- README_maintainers.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README_maintainers.md b/README_maintainers.md index 4201c8a694..5a5c40d683 100644 --- a/README_maintainers.md +++ b/README_maintainers.md @@ -342,9 +342,21 @@ arangod commandline arguments __________________________________________________________________________________________________________ -Linux Cordeumps +Linux Coredumps =============== -Hint: on Ubuntu the `apport` package may interfere with this. +Generally coredumps have to be enabled using: + + ulimit -c unlimited + +You should then see: + + ulimit -a + core file size (blocks, -c) unlimited + +for each shell and its subsequent processes. + +Hint: on Ubuntu the `apport` package may interfere with this; however you may use the `systemd-coredump` package +which automates much of the following: So that the unit testing framework can autorun gdb it needs to reliably find the corefiles. In Linux this is configured via the `/proc` filesystem, you can make this reboot permanent by @@ -365,6 +377,22 @@ Solaris Coredumps Solaris configures the system corefile behaviour via the `coreadm` programm. see https://docs.oracle.com/cd/E19455-01/805-7229/6j6q8svhr/ for more details. +Analyzing Coredumps on Linux +============================ +We offer debug packages containing the debug symbols for your binaries. Please install them if you didn't compile yourselves. + +Given you saw in the log of the arangod with the PID `25216` that it died, you should then find +`/var/tmp/core-V8 WorkerThread-25216-1490887259` with this information. We may now start GDB and inspect whats going on: + + gdb /usr/sbin/arangod /var/tmp/*25216* + +These commands give usefull information about the incident: + + backtrace full + thread apply all bt + +The first gives the full stacktrace including variables of the last active thread, the later one the stacktraces of all threads. + Windows debugging ================= For the average \*nix user windows debugging has some awkward methods. From 9a96487991c602f7151b1272110f3af60f2c0c0c Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Fri, 7 Apr 2017 11:26:00 +0200 Subject: [PATCH 08/11] use GNU/sed on mac, fix location of catch test --- Installation/Jenkins/build.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Installation/Jenkins/build.sh b/Installation/Jenkins/build.sh index f326c64e6e..085dfba3a3 100755 --- a/Installation/Jenkins/build.sh +++ b/Installation/Jenkins/build.sh @@ -11,6 +11,13 @@ if test "`uname -o||true`" == "Cygwin"; then isCygwin=1 fi +SED=sed +isMac=0 +if test "`uname`" == "Darwin"; then + isMac=1 + SED=gsed +fi + # debian mac for f in /usr/bin/md5sum /sbin/md5; do if test -e ${f}; then @@ -33,7 +40,7 @@ fi # remove local from LD_LIBRARY_PATH if [ "$LD_LIBRARY_PATH" != "" ]; then - LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | sed -e 's/:$//'`; + LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | ${SED} -e 's/:$//'`; fi # find out if we are running on 32 or 64 bit @@ -555,7 +562,7 @@ if test -n "${ENTERPRISE_GIT_URL}" ; then GITARGS=`git describe --exact-match --tags ${GITSHA}` echo "I'm on tag: ${GITARGS}" else - GITARGS=`git branch --no-color| grep '^\*' | sed "s;\* *;;"` + GITARGS=`git branch --no-color| grep '^\*' | ${SED} "s;\* *;;"` if echo $GITARGS |grep -q ' '; then GITARGS=devel fi @@ -576,7 +583,7 @@ if test -n "${ENTERPRISE_GIT_URL}" ; then EP_GITARGS=`git describe --exact-match --tags ${EP_GITSHA}` echo "I'm on tag: ${GITARGS}" else - EP_GITARGS=`git branch --no-color| grep '^\*' | sed "s;\* *;;"` + EP_GITARGS=`git branch --no-color| grep '^\*' | ${SED} "s;\* *;;"` if echo $EP_GITARGS |grep -q ' '; then EP_GITARGS=devel fi @@ -652,7 +659,7 @@ if test -n "${TARGET_DIR}"; then else # we re-use a generic cpack tarball: ${PACKAGE_MAKE} TGZ_package - PKG_NAME=`grep CPACK_PACKAGE_FILE_NAME CPackConfig.cmake | sed 's/\r//' |sed -e 's;".$;;' -e 's;.*";;'` + PKG_NAME=`grep CPACK_PACKAGE_FILE_NAME CPackConfig.cmake | ${SED} 's/\r//' | ${SED} -e 's;".$;;' -e 's;.*";;'` TARFILE=arangodb-`uname`${TAR_SUFFIX}.tar.gz @@ -682,10 +689,11 @@ if test -n "${TARGET_DIR}"; then fi if test "${isCygwin}" == 1; then - SSLDIR=`grep FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL CMakeCache.txt | sed 's/\r//' |sed -e "s/.*optimized;//" -e "s/;.*//" -e "s;/lib.*lib;;" -e "s;\([a-zA-Z]*\):;/cygdrive/\1;"` + SSLDIR=`grep FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL CMakeCache.txt | ${SED} 's/\r//' | ${SED} -e "s/.*optimized;//" -e "s/;.*//" -e "s;/lib.*lib;;" -e "s;\([a-zA-Z]*\):;/cygdrive/\1;"` DLLS=`find ${SSLDIR} -name \*.dll |grep -i release` cp ${DLLS} bin/${BUILD_CONFIG} cp bin/${BUILD_CONFIG}/* bin/ + cp tests/${BUILD_CONFIG}/* tests/ fi tar -u -f ${TARFILE_TMP} \ bin etc tests @@ -711,6 +719,6 @@ if test -n "${TARGET_DIR}"; then fi gzip < ${TARFILE_TMP} > ${dir}/${TARFILE} - ${MD5} < ${dir}/${TARFILE} |sed "s; .*;;" > ${dir}/${TARFILE}.md5 + ${MD5} < ${dir}/${TARFILE} | ${SED} "s; .*;;" > ${dir}/${TARFILE}.md5 fi fi From 2b0673c3fed920bd9a406f841d1ca683c891008e Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 7 Apr 2017 12:05:56 +0200 Subject: [PATCH 09/11] removed type "Index" --- arangod/RocksDBEngine/RocksDBCollection.cpp | 19 ++----- arangod/RocksDBEngine/RocksDBCommon.cpp | 11 +--- arangod/RocksDBEngine/RocksDBCommon.h | 1 - .../RocksDBEngine/RocksDBCounterManager.cpp | 14 ++--- arangod/RocksDBEngine/RocksDBEngine.cpp | 33 ++++++------ arangod/RocksDBEngine/RocksDBKey.cpp | 53 +------------------ arangod/RocksDBEngine/RocksDBKey.h | 22 +------- arangod/RocksDBEngine/RocksDBKeyBounds.cpp | 33 ------------ arangod/RocksDBEngine/RocksDBKeyBounds.h | 13 ----- arangod/RocksDBEngine/RocksDBPrimaryIndex.cpp | 4 +- .../RocksDBEngine/RocksDBTransactionState.cpp | 3 ++ arangod/RocksDBEngine/RocksDBTypes.cpp | 24 ++++----- arangod/RocksDBEngine/RocksDBTypes.h | 5 +- arangod/RocksDBEngine/RocksDBValue.cpp | 5 -- arangod/RocksDBEngine/RocksDBValue.h | 3 +- 15 files changed, 52 insertions(+), 191 deletions(-) diff --git a/arangod/RocksDBEngine/RocksDBCollection.cpp b/arangod/RocksDBEngine/RocksDBCollection.cpp index 96247e6c54..da1ca00bcd 100644 --- a/arangod/RocksDBEngine/RocksDBCollection.cpp +++ b/arangod/RocksDBEngine/RocksDBCollection.cpp @@ -161,7 +161,11 @@ TRI_voc_rid_t RocksDBCollection::revision(transaction::Methods* trx) const { state->findCollection(_logicalCollection->cid())); TRI_ASSERT(trxCollection != nullptr); - return trxCollection->revision(); + TRI_voc_rid_t revisionId = trxCollection->revision(); + if (!revisionId) { + revisionId = _revisionId; + } + return revisionId; } uint64_t RocksDBCollection::numberDocuments() const { return _numberDocuments; } @@ -190,8 +194,6 @@ void RocksDBCollection::open(bool ignoreErrors) { auto counterValue = engine->counterManager()->loadCounter(this->objectId()); _numberDocuments = counterValue.first; _revisionId = counterValue.second; - //_numberDocuments = countKeyRange(db, readOptions, - // RocksDBKeyBounds::CollectionDocuments(_objectId)); } /// @brief iterate all markers of a collection on load @@ -943,12 +945,6 @@ int RocksDBCollection::insertDocument(arangodb::transaction::Methods* trx, rocksdb::Transaction* rtrx = rocksTransaction(trx); - /* - LOG_TOPIC(ERR, Logger::ENGINE) - << "INSERT DOCUMENT. COLLECTION '" << _logicalCollection->name() - << "', OBJECTID: " << _objectId << ", REVISIONID: " << revisionId; - - */ rocksdb::Status status = rtrx->Put(key.string(), value.string()); if (!status.ok()) { @@ -971,11 +967,6 @@ int RocksDBCollection::insertDocument(arangodb::transaction::Methods* trx, if (res == TRI_ERROR_OUT_OF_MEMORY) { return res; } - if (res == TRI_ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED) { - LOG_TOPIC(ERR, Logger::FIXME) - << "#" << trx->state()->id() - << " UNIQUE CONSTRAINT VIOLATION IN INDEX: #" << i; - } if (res != TRI_ERROR_NO_ERROR) { if (res == TRI_ERROR_ARANGO_UNIQUE_CONSTRAINT_VIOLATED || result == TRI_ERROR_NO_ERROR) { diff --git a/arangod/RocksDBEngine/RocksDBCommon.cpp b/arangod/RocksDBEngine/RocksDBCommon.cpp index 7e27b5a978..ccf43cfee8 100644 --- a/arangod/RocksDBEngine/RocksDBCommon.cpp +++ b/arangod/RocksDBEngine/RocksDBCommon.cpp @@ -236,16 +236,7 @@ std::vector> collectionKVPairs( }); return rv; } -std::vector> indexKVPairs( - TRI_voc_tick_t databaseId, TRI_voc_cid_t cid) { - std::vector> rv; - RocksDBKeyBounds bounds = RocksDBKeyBounds::DatabaseIndexes(databaseId, cid); - iterateBounds(bounds, [&rv](rocksdb::Iterator* it) { - rv.emplace_back(RocksDBKey(it->key()), - RocksDBValue(RocksDBEntryType::Index, it->value())); - }); - return rv; -} + std::vector> viewKVPairs( TRI_voc_tick_t databaseId) { std::vector> rv; diff --git a/arangod/RocksDBEngine/RocksDBCommon.h b/arangod/RocksDBEngine/RocksDBCommon.h index d63e2c0431..d316b3d582 100644 --- a/arangod/RocksDBEngine/RocksDBCommon.h +++ b/arangod/RocksDBEngine/RocksDBCommon.h @@ -82,7 +82,6 @@ std::size_t countKeyRange(rocksdb::DB*, rocksdb::ReadOptions const&, Result removeLargeRange(rocksdb::TransactionDB* db, RocksDBKeyBounds const& bounds); std::vector> collectionKVPairs(TRI_voc_tick_t databaseId); -std::vector> indexKVPairs(TRI_voc_tick_t databaseId, TRI_voc_cid_t cid); std::vector> viewKVPairs(TRI_voc_tick_t databaseId); // optional switch to std::function to reduce amount of includes and to avoid template diff --git a/arangod/RocksDBEngine/RocksDBCounterManager.cpp b/arangod/RocksDBEngine/RocksDBCounterManager.cpp index 81063ad324..b7bd44203c 100644 --- a/arangod/RocksDBEngine/RocksDBCounterManager.cpp +++ b/arangod/RocksDBEngine/RocksDBCounterManager.cpp @@ -81,15 +81,17 @@ RocksDBCounterManager::RocksDBCounterManager(rocksdb::DB* db, double interval) void RocksDBCounterManager::beginShutdown() { Thread::beginShutdown(); - _condition.broadcast(); - // CONDITION_LOCKER(locker, _condition); - // locker.signal(); + + // wake up the thread that may be waiting in run() + CONDITION_LOCKER(guard, _condition); + guard.broadcast(); } void RocksDBCounterManager::run() { while (!isStopping()) { - CONDITION_LOCKER(locker, _condition); - locker.wait(static_cast(_interval * 1000000.0)); + CONDITION_LOCKER(guard, _condition); + guard.wait(static_cast(_interval * 1000000.0)); + if (!isStopping()) { this->sync(); } @@ -101,7 +103,7 @@ std::pair RocksDBCounterManager::loadCounter(uint64_t object READ_LOCKER(guard, _rwLock); auto const& it = _counters.find(objectId); if (it != _counters.end()) { - return std::make_pair(it->second.count, it->second.sequenceNumber); + return std::make_pair(it->second.count, it->second.revisionId); } } return std::make_pair(0, 0); // do not create diff --git a/arangod/RocksDBEngine/RocksDBEngine.cpp b/arangod/RocksDBEngine/RocksDBEngine.cpp index faeec1d054..8094ce70f3 100644 --- a/arangod/RocksDBEngine/RocksDBEngine.cpp +++ b/arangod/RocksDBEngine/RocksDBEngine.cpp @@ -579,6 +579,7 @@ void RocksDBEngine::createIndex(TRI_vocbase_t* vocbase, TRI_voc_cid_t collectionId, TRI_idx_iid_t indexId, arangodb::velocypack::Slice const& data) { + /* rocksdb::WriteOptions options; // TODO: check which options would make sense auto key = RocksDBKey::Index(vocbase->id(), collectionId, indexId); auto value = RocksDBValue::Index(data); @@ -588,6 +589,7 @@ void RocksDBEngine::createIndex(TRI_vocbase_t* vocbase, if (!result.ok()) { THROW_ARANGO_EXCEPTION(result.errorNumber()); } + */ } void RocksDBEngine::dropIndex(TRI_vocbase_t* vocbase, @@ -760,22 +762,23 @@ Result RocksDBEngine::dropDatabase(TRI_voc_tick_t id) { // remove collections for (auto const& val : collectionKVPairs(id)) { - TRI_voc_cid_t cid = - basics::VelocyPackHelper::stringUInt64(val.second.slice(), "cid"); // remove indexes - for (auto& val : indexKVPairs(id, cid)) { - // delete index documents - uint64_t objectId = basics::VelocyPackHelper::stringUInt64( - val.second.slice(), "objectId"); - RocksDBKeyBounds bounds = RocksDBKeyBounds::IndexEntries(objectId); - res = rocksutils::removeLargeRange(_db, bounds); - if (res.fail()) { - return res; - } - // delete index - res = globalRocksDBRemove(val.first.string(), options); - if (res.fail()) { - return res; + VPackSlice indexes = val.second.slice().get("indexes"); + if (indexes.isArray()) { + for (auto const& it : VPackArrayIterator(indexes)) { + // delete index documents + uint64_t objectId = basics::VelocyPackHelper::stringUInt64( + it, "objectId"); + RocksDBKeyBounds bounds = RocksDBKeyBounds::IndexEntries(objectId); + res = rocksutils::removeLargeRange(_db, bounds); + if (res.fail()) { + return res; + } + // delete index + res = globalRocksDBRemove(val.first.string(), options); + if (res.fail()) { + return res; + } } } diff --git a/arangod/RocksDBEngine/RocksDBKey.cpp b/arangod/RocksDBEngine/RocksDBKey.cpp index 7e4afa6625..fc77c99bf2 100644 --- a/arangod/RocksDBEngine/RocksDBKey.cpp +++ b/arangod/RocksDBEngine/RocksDBKey.cpp @@ -42,12 +42,6 @@ RocksDBKey RocksDBKey::Collection(TRI_voc_tick_t databaseId, return RocksDBKey(RocksDBEntryType::Collection, databaseId, collectionId); } -RocksDBKey RocksDBKey::Index(TRI_voc_tick_t databaseId, - TRI_voc_cid_t collectionId, - TRI_idx_iid_t indexId) { - return RocksDBKey(RocksDBEntryType::Index, databaseId, collectionId, indexId); -} - RocksDBKey RocksDBKey::Document(uint64_t collectionId, TRI_voc_rid_t revisionId) { return RocksDBKey(RocksDBEntryType::Document, collectionId, revisionId); @@ -120,14 +114,6 @@ TRI_voc_cid_t RocksDBKey::collectionId(rocksdb::Slice const& slice) { return collectionId(slice.data(), slice.size()); } -TRI_idx_iid_t RocksDBKey::indexId(RocksDBKey const& key) { - return indexId(key._buffer.data(), key._buffer.size()); -} - -TRI_idx_iid_t RocksDBKey::indexId(rocksdb::Slice const& slice) { - return indexId(slice.data(), slice.size()); -} - TRI_voc_cid_t RocksDBKey::viewId(RocksDBKey const& key) { return viewId(key._buffer.data(), key._buffer.size()); } @@ -231,26 +217,6 @@ RocksDBKey::RocksDBKey(RocksDBEntryType type, uint64_t first, uint64_t second) } } -RocksDBKey::RocksDBKey(RocksDBEntryType type, uint64_t first, uint64_t second, - uint64_t third) - : _type(type), _buffer() { - switch (_type) { - case RocksDBEntryType::Index: { - size_t length = - sizeof(char) + sizeof(uint64_t) + sizeof(uint64_t) + sizeof(uint64_t); - _buffer.reserve(length); - _buffer.push_back(static_cast(_type)); - uint64ToPersistent(_buffer, first); // databaseId - uint64ToPersistent(_buffer, second); // collectionId - uint64ToPersistent(_buffer, third); // indexId - break; - } - - default: - THROW_ARANGO_EXCEPTION(TRI_ERROR_BAD_PARAMETER); - } -} - RocksDBKey::RocksDBKey(RocksDBEntryType type, uint64_t first, arangodb::StringRef const& docKey, VPackSlice const& indexData) @@ -335,7 +301,6 @@ TRI_voc_tick_t RocksDBKey::databaseId(char const* data, size_t size) { switch (type) { case RocksDBEntryType::Database: case RocksDBEntryType::Collection: - case RocksDBEntryType::Index: case RocksDBEntryType::View: { TRI_ASSERT(size >= (sizeof(char) + sizeof(uint64_t))); return uint64FromPersistent(data + sizeof(char)); @@ -351,8 +316,7 @@ TRI_voc_cid_t RocksDBKey::collectionId(char const* data, size_t size) { TRI_ASSERT(size >= sizeof(char)); RocksDBEntryType type = static_cast(data[0]); switch (type) { - case RocksDBEntryType::Collection: - case RocksDBEntryType::Index: { + case RocksDBEntryType::Collection: { TRI_ASSERT(size >= (sizeof(char) + (2 * sizeof(uint64_t)))); return uint64FromPersistent(data + sizeof(char) + sizeof(uint64_t)); } @@ -362,21 +326,6 @@ TRI_voc_cid_t RocksDBKey::collectionId(char const* data, size_t size) { } } -TRI_idx_iid_t RocksDBKey::indexId(char const* data, size_t size) { - TRI_ASSERT(data != nullptr); - TRI_ASSERT(size >= sizeof(char)); - RocksDBEntryType type = static_cast(data[0]); - switch (type) { - case RocksDBEntryType::Index: { - TRI_ASSERT(size >= (sizeof(char) + (3 * sizeof(uint64_t)))); - return uint64FromPersistent(data + sizeof(char) + (2 * sizeof(uint64_t))); - } - - default: - THROW_ARANGO_EXCEPTION(TRI_ERROR_TYPE_ERROR); - } -} - TRI_voc_cid_t RocksDBKey::viewId(char const* data, size_t size) { TRI_ASSERT(data != nullptr); TRI_ASSERT(size >= sizeof(char)); diff --git a/arangod/RocksDBEngine/RocksDBKey.h b/arangod/RocksDBEngine/RocksDBKey.h index 8173acc7d9..1a6edb89c7 100644 --- a/arangod/RocksDBEngine/RocksDBKey.h +++ b/arangod/RocksDBEngine/RocksDBKey.h @@ -56,12 +56,6 @@ class RocksDBKey { static RocksDBKey Collection(TRI_voc_tick_t databaseId, TRI_voc_cid_t collectionId); - ////////////////////////////////////////////////////////////////////////////// - /// @brief Create a fully-specified index key - ////////////////////////////////////////////////////////////////////////////// - static RocksDBKey Index(TRI_voc_tick_t databaseId, TRI_voc_cid_t collectionId, - TRI_idx_iid_t indexId); - ////////////////////////////////////////////////////////////////////////////// /// @brief Create a fully-specified document key ////////////////////////////////////////////////////////////////////////////// @@ -140,7 +134,7 @@ class RocksDBKey { /// @brief Extracts the databaseId from a key /// /// May be called only on the following key types: Database, Collection, - /// Index, and View. Other types will throw. + /// View. Other types will throw. ////////////////////////////////////////////////////////////////////////////// static TRI_voc_tick_t databaseId(RocksDBKey const&); static TRI_voc_tick_t databaseId(rocksdb::Slice const&); @@ -148,21 +142,12 @@ class RocksDBKey { ////////////////////////////////////////////////////////////////////////////// /// @brief Extracts the collectionId from a key /// - /// May be called only on the the following key types: Collection and Index. + /// May be called only on the the following key types: Collection. /// Other types will throw. ////////////////////////////////////////////////////////////////////////////// static TRI_voc_cid_t collectionId(RocksDBKey const&); static TRI_voc_cid_t collectionId(rocksdb::Slice const&); - ////////////////////////////////////////////////////////////////////////////// - /// @brief Extracts the indexId from a key - /// - /// May be called only on Index keys (not index values). Other types will - /// throw. - ////////////////////////////////////////////////////////////////////////////// - static TRI_idx_iid_t indexId(RocksDBKey const&); - static TRI_idx_iid_t indexId(rocksdb::Slice const&); - ////////////////////////////////////////////////////////////////////////////// /// @brief Extracts the viewId from a key /// @@ -215,8 +200,6 @@ class RocksDBKey { private: RocksDBKey(RocksDBEntryType type, uint64_t first); RocksDBKey(RocksDBEntryType type, uint64_t first, uint64_t second); - RocksDBKey(RocksDBEntryType type, uint64_t first, uint64_t second, - uint64_t third); RocksDBKey(RocksDBEntryType type, uint64_t first, VPackSlice const& slice); RocksDBKey(RocksDBEntryType type, uint64_t first, arangodb::StringRef const& docKey, VPackSlice const& indexData); @@ -228,7 +211,6 @@ class RocksDBKey { static RocksDBEntryType type(char const* data, size_t size); static TRI_voc_tick_t databaseId(char const* data, size_t size); static TRI_voc_cid_t collectionId(char const* data, size_t size); - static TRI_idx_iid_t indexId(char const* data, size_t size); static TRI_voc_cid_t viewId(char const* data, size_t size); static TRI_voc_rid_t revisionId(char const* data, size_t size); static StringRef primaryKey(char const* data, size_t size); diff --git a/arangod/RocksDBEngine/RocksDBKeyBounds.cpp b/arangod/RocksDBEngine/RocksDBKeyBounds.cpp index 5f01c8e3f4..acedca2c3c 100644 --- a/arangod/RocksDBEngine/RocksDBKeyBounds.cpp +++ b/arangod/RocksDBEngine/RocksDBKeyBounds.cpp @@ -44,16 +44,6 @@ RocksDBKeyBounds RocksDBKeyBounds::DatabaseCollections( return RocksDBKeyBounds(RocksDBEntryType::Collection, databaseId); } -RocksDBKeyBounds RocksDBKeyBounds::DatabaseIndexes(TRI_voc_tick_t databaseId, - TRI_voc_cid_t cid) { - return RocksDBKeyBounds(RocksDBEntryType::Index, databaseId, cid); -} - -RocksDBKeyBounds RocksDBKeyBounds::CollectionIndexes( - TRI_voc_tick_t databaseId, TRI_voc_cid_t collectionId) { - return RocksDBKeyBounds(RocksDBEntryType::Index, databaseId, collectionId); -} - RocksDBKeyBounds RocksDBKeyBounds::CollectionDocuments(uint64_t collectionId) { return RocksDBKeyBounds(RocksDBEntryType::Document, collectionId); } @@ -206,29 +196,6 @@ RocksDBKeyBounds::RocksDBKeyBounds(RocksDBEntryType type, uint64_t first) } } -RocksDBKeyBounds::RocksDBKeyBounds(RocksDBEntryType type, uint64_t first, - uint64_t second) - : _type(type), _startBuffer(), _endBuffer() { - switch (_type) { - case RocksDBEntryType::Index: { - size_t length = sizeof(char) + (2 * sizeof(uint64_t)); - _startBuffer.reserve(length); - _startBuffer.push_back(static_cast(_type)); - uint64ToPersistent(_startBuffer, first); - uint64ToPersistent(_startBuffer, second); - - _endBuffer.clear(); - _endBuffer.append(_startBuffer); - nextPrefix(_endBuffer); - - break; - } - - default: - THROW_ARANGO_EXCEPTION(TRI_ERROR_BAD_PARAMETER); - } -} - RocksDBKeyBounds::RocksDBKeyBounds(RocksDBEntryType type, uint64_t first, std::string const& second) : _type(type), _startBuffer(), _endBuffer() { diff --git a/arangod/RocksDBEngine/RocksDBKeyBounds.h b/arangod/RocksDBEngine/RocksDBKeyBounds.h index 48c6c2f856..5944d60e5b 100644 --- a/arangod/RocksDBEngine/RocksDBKeyBounds.h +++ b/arangod/RocksDBEngine/RocksDBKeyBounds.h @@ -50,18 +50,6 @@ class RocksDBKeyBounds { ////////////////////////////////////////////////////////////////////////////// static RocksDBKeyBounds DatabaseCollections(TRI_voc_tick_t databaseId); - ////////////////////////////////////////////////////////////////////////////// - /// @brief Bounds for all collections belonging to a specified database - ////////////////////////////////////////////////////////////////////////////// - static RocksDBKeyBounds DatabaseIndexes(TRI_voc_tick_t databaseId, - TRI_voc_cid_t cid); - - ////////////////////////////////////////////////////////////////////////////// - /// @brief Bounds for all indexes belonging to a specified collection - ////////////////////////////////////////////////////////////////////////////// - static RocksDBKeyBounds CollectionIndexes(TRI_voc_tick_t databaseId, - TRI_voc_cid_t collectionId); - ////////////////////////////////////////////////////////////////////////////// /// @brief Bounds for all documents belonging to a specified collection ////////////////////////////////////////////////////////////////////////////// @@ -139,7 +127,6 @@ class RocksDBKeyBounds { private: RocksDBKeyBounds(RocksDBEntryType type); RocksDBKeyBounds(RocksDBEntryType type, uint64_t first); - RocksDBKeyBounds(RocksDBEntryType type, uint64_t first, uint64_t second); RocksDBKeyBounds(RocksDBEntryType type, uint64_t first, std::string const& second); RocksDBKeyBounds(RocksDBEntryType type, uint64_t first, diff --git a/arangod/RocksDBEngine/RocksDBPrimaryIndex.cpp b/arangod/RocksDBEngine/RocksDBPrimaryIndex.cpp index d8d0372c0d..6e25de9e5b 100644 --- a/arangod/RocksDBEngine/RocksDBPrimaryIndex.cpp +++ b/arangod/RocksDBEngine/RocksDBPrimaryIndex.cpp @@ -255,8 +255,8 @@ RocksDBPrimaryIndex::RocksDBPrimaryIndex( StaticStrings::KeyString, false)}}), true, false, basics::VelocyPackHelper::stringUInt64(info, "objectId")) { - _useCache = false; - // createCache(); + _useCache = true; + createCache(); } RocksDBPrimaryIndex::~RocksDBPrimaryIndex() {} diff --git a/arangod/RocksDBEngine/RocksDBTransactionState.cpp b/arangod/RocksDBEngine/RocksDBTransactionState.cpp index 6e38973001..2e46f38da4 100644 --- a/arangod/RocksDBEngine/RocksDBTransactionState.cpp +++ b/arangod/RocksDBEngine/RocksDBTransactionState.cpp @@ -176,6 +176,8 @@ Result RocksDBTransactionState::commitTransaction( } rocksdb::Snapshot const* snap = this->_rocksReadOptions.snapshot; + TRI_ASSERT(snap != nullptr); + for (auto& trxCollection : _collections) { RocksDBTransactionCollection* collection = static_cast(trxCollection); @@ -190,6 +192,7 @@ Result RocksDBTransactionState::commitTransaction( coll->setRevision(collection->revision()); RocksDBEngine* engine = static_cast(EngineSelectorFeature::ENGINE); + engine->counterManager()->updateCounter( coll->objectId(), snap, adjustment, collection->revision()); } diff --git a/arangod/RocksDBEngine/RocksDBTypes.cpp b/arangod/RocksDBEngine/RocksDBTypes.cpp index 750f1f68e4..7b5527141e 100644 --- a/arangod/RocksDBEngine/RocksDBTypes.cpp +++ b/arangod/RocksDBEngine/RocksDBTypes.cpp @@ -38,9 +38,9 @@ static rocksdb::Slice Collection( &collection), 1); -static RocksDBEntryType index = RocksDBEntryType::Index; -static rocksdb::Slice Index( - reinterpret_cast::type*>(&index), 1); +static RocksDBEntryType counterVal = RocksDBEntryType::CounterValue; +static rocksdb::Slice CounterValue( + reinterpret_cast::type*>(&counterVal), 1); static RocksDBEntryType document = RocksDBEntryType::Document; static rocksdb::Slice Document( @@ -74,34 +74,28 @@ static rocksdb::Slice UniqueIndexValue( static RocksDBEntryType view = RocksDBEntryType::View; static rocksdb::Slice View( reinterpret_cast::type*>(&view), 1); - -static RocksDBEntryType counterVal = RocksDBEntryType::CounterValue; -static rocksdb::Slice CounterValue( - reinterpret_cast::type*>(&counterVal), 1); } rocksdb::Slice const& arangodb::rocksDBSlice(RocksDBEntryType const& type) { switch (type) { - case RocksDBEntryType::Document: - return Document; - case RocksDBEntryType::Collection: - return Collection; case RocksDBEntryType::Database: return Database; + case RocksDBEntryType::Collection: + return Collection; + case RocksDBEntryType::CounterValue: + return CounterValue; + case RocksDBEntryType::Document: + return Document; case RocksDBEntryType::PrimaryIndexValue: return PrimaryIndexValue; case RocksDBEntryType::EdgeIndexValue: return EdgeIndexValue; - case RocksDBEntryType::Index: - return Index; case RocksDBEntryType::IndexValue: return IndexValue; case RocksDBEntryType::UniqueIndexValue: return UniqueIndexValue; case RocksDBEntryType::View: return View; - case RocksDBEntryType::CounterValue: - return CounterValue; } return Document; // avoids warning - errorslice instead ?! diff --git a/arangod/RocksDBEngine/RocksDBTypes.h b/arangod/RocksDBEngine/RocksDBTypes.h index 5f934e588a..914d8603b8 100644 --- a/arangod/RocksDBEngine/RocksDBTypes.h +++ b/arangod/RocksDBEngine/RocksDBTypes.h @@ -34,14 +34,13 @@ namespace arangodb { enum class RocksDBEntryType : char { Database = '0', Collection = '1', - Index = '2', + CounterValue = '2', Document = '3', PrimaryIndexValue = '4', EdgeIndexValue = '5', IndexValue = '6', UniqueIndexValue = '7', - View = '8', - CounterValue = '9' + View = '8' }; rocksdb::Slice const& rocksDBSlice(RocksDBEntryType const& type); diff --git a/arangod/RocksDBEngine/RocksDBValue.cpp b/arangod/RocksDBEngine/RocksDBValue.cpp index 5bf6f51fab..d46d4b770d 100644 --- a/arangod/RocksDBEngine/RocksDBValue.cpp +++ b/arangod/RocksDBEngine/RocksDBValue.cpp @@ -37,10 +37,6 @@ RocksDBValue RocksDBValue::Collection(VPackSlice const& data) { return RocksDBValue(RocksDBEntryType::Collection, data); } -RocksDBValue RocksDBValue::Index(VPackSlice const& data) { - return RocksDBValue(RocksDBEntryType::Index, data); -} - RocksDBValue RocksDBValue::Document(VPackSlice const& data) { return RocksDBValue(RocksDBEntryType::Document, data); } @@ -141,7 +137,6 @@ RocksDBValue::RocksDBValue(RocksDBEntryType type, VPackSlice const& data) switch (_type) { case RocksDBEntryType::Database: case RocksDBEntryType::Collection: - case RocksDBEntryType::Index: case RocksDBEntryType::Document: case RocksDBEntryType::View: { _buffer.reserve(static_cast(data.byteSize())); diff --git a/arangod/RocksDBEngine/RocksDBValue.h b/arangod/RocksDBEngine/RocksDBValue.h index b114b5bc4a..fd158cc264 100644 --- a/arangod/RocksDBEngine/RocksDBValue.h +++ b/arangod/RocksDBEngine/RocksDBValue.h @@ -47,7 +47,6 @@ class RocksDBValue { static RocksDBValue Database(VPackSlice const& data); static RocksDBValue Collection(VPackSlice const& data); - static RocksDBValue Index(VPackSlice const& data); static RocksDBValue Document(VPackSlice const& data); static RocksDBValue PrimaryIndexValue(TRI_voc_rid_t revisionId); static RocksDBValue EdgeIndexValue(); @@ -84,7 +83,7 @@ class RocksDBValue { /// @brief Extracts the VelocyPack data from a value /// /// May be called only values of the following types: Database, Collection, - /// Index, Document, and View. Other types will throw. + /// Document, and View. Other types will throw. ////////////////////////////////////////////////////////////////////////////// static VPackSlice data(RocksDBValue const&); static VPackSlice data(rocksdb::Slice const&); From 5ead1eec5a153e4ca3ad38741f56b577eb69275b Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 7 Apr 2017 12:06:33 +0200 Subject: [PATCH 10/11] added some debug output --- arangosh/Benchmark/BenchmarkThread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arangosh/Benchmark/BenchmarkThread.h b/arangosh/Benchmark/BenchmarkThread.h index ea6a155ed4..f464a5f730 100644 --- a/arangosh/Benchmark/BenchmarkThread.h +++ b/arangosh/Benchmark/BenchmarkThread.h @@ -350,7 +350,7 @@ class BenchmarkThread : public arangodb::Thread { } _warningCount++; if (_warningCount < MaxWarnings) { - LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "batch operation failed because server did not reply"; + LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "single operation failed because server did not reply"; } return; } @@ -361,7 +361,7 @@ class BenchmarkThread : public arangodb::Thread { _warningCount++; if (_warningCount < MaxWarnings) { LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "request for URL '" << url << "' failed with HTTP code " - << result->getHttpReturnCode(); + << result->getHttpReturnCode() << ": " << std::string(result->getBody().c_str(), result->getBody().length()); } else if (_warningCount == MaxWarnings) { LOG_TOPIC(WARN, arangodb::Logger::FIXME) << "...more warnings..."; } From 742e5d17fd8c8eee569966840a9a6ee6f3b5d3bc Mon Sep 17 00:00:00 2001 From: jsteemann Date: Fri, 7 Apr 2017 12:17:54 +0200 Subject: [PATCH 11/11] remove always-true asserts --- arangod/RocksDBEngine/RocksDBCollection.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/arangod/RocksDBEngine/RocksDBCollection.cpp b/arangod/RocksDBEngine/RocksDBCollection.cpp index 5f63c774be..da1ca00bcd 100644 --- a/arangod/RocksDBEngine/RocksDBCollection.cpp +++ b/arangod/RocksDBEngine/RocksDBCollection.cpp @@ -192,8 +192,6 @@ void RocksDBCollection::open(bool ignoreErrors) { RocksDBEngine* engine = static_cast(EngineSelectorFeature::ENGINE); auto counterValue = engine->counterManager()->loadCounter(this->objectId()); - TRI_ASSERT(counterValue.first >= 0); - TRI_ASSERT(counterValue.second >= 0); _numberDocuments = counterValue.first; _revisionId = counterValue.second; }