Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#8853
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
CalvinNeo authored and ti-chi-bot committed Apr 30, 2024
1 parent eb6272c commit e795a89
Show file tree
Hide file tree
Showing 14 changed files with 1,982 additions and 59 deletions.
29 changes: 29 additions & 0 deletions contrib/tiflash-proxy-cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,39 @@

if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG" OR SAN_DEBUG)
set(_TIFLASH_PROXY_BUILD_PROFILE "debug")
<<<<<<< HEAD
set(_TIFLASH_PROXY_MAKE_COMMAND make debug)
else()
set(_TIFLASH_PROXY_BUILD_PROFILE "release")
set(_TIFLASH_PROXY_MAKE_COMMAND make release)
=======
if (ENABLE_JEMALLOC)
if (APPLE)
message(STATUS "proxy's jemalloc is disabled (AppleOS)")
set(_TIFLASH_PROXY_MAKE_COMMAND make debug)
else()
message(STATUS "proxy's jemalloc is enabled")
set(_TIFLASH_PROXY_MAKE_COMMAND ENABLE_FEATURES="external-jemalloc" make debug)
endif()
else()
message(STATUS "proxy's jemalloc is disabled")
set(_TIFLASH_PROXY_MAKE_COMMAND make debug)
endif()
else()
set(_TIFLASH_PROXY_BUILD_PROFILE "release")
if (ENABLE_JEMALLOC)
if (APPLE)
message(STATUS "proxy's jemalloc is disabled (AppleOS)")
set(_TIFLASH_PROXY_MAKE_COMMAND make release)
else()
message(STATUS "proxy's jemalloc is enabled")
set(_TIFLASH_PROXY_MAKE_COMMAND ENABLE_FEATURES="external-jemalloc" make release)
endif()
else()
message(STATUS "proxy's jemalloc is disabled")
set(_TIFLASH_PROXY_MAKE_COMMAND make release)
endif()
>>>>>>> ce8ae39fb9 (Debug: Add find key debug invoker (#8853))
endif()

set(_TIFLASH_PROXY_SOURCE_DIR "${TiFlash_SOURCE_DIR}/contrib/tiflash-proxy")
Expand Down
793 changes: 793 additions & 0 deletions dbms/src/Common/TiFlashMetrics.h

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions dbms/src/Debug/DBGInvoker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
#include <Debug/dbgFuncRegion.h>
#include <Debug/dbgFuncSchema.h>
#include <Debug/dbgFuncSchemaName.h>
<<<<<<< HEAD
=======
#include <Debug/dbgKVStore/dbgFuncInvestigator.h>
#include <Debug/dbgKVStore/dbgFuncMockRaftCommand.h>
#include <Debug/dbgKVStore/dbgFuncRegion.h>
>>>>>>> ce8ae39fb9 (Debug: Add find key debug invoker (#8853))
#include <Parsers/ASTLiteral.h>

#include <thread>
Expand Down Expand Up @@ -104,6 +110,10 @@ DBGInvoker::DBGInvoker()
regSchemalessFunc("region_snapshot_pre_handle_file_pks", MockRaftCommand::dbgFuncRegionSnapshotPreHandleDTFilesWithHandles);
regSchemalessFunc("region_snapshot_apply_file", /* */ MockRaftCommand::dbgFuncRegionSnapshotApplyDTFiles);
regSchemalessFunc("region_ingest_sst", MockRaftCommand::dbgFuncIngestSST);
// Test whether a PK exists in KVStore.
regSchemalessFunc("find_key_kvstore", dbgFuncFindKey);
// Test whether a PK exists in DT.
regSchemafulFunc("find_key_dt", dbgFuncFindKeyDt);

regSchemalessFunc("init_fail_point", DbgFailPointFunc::dbgInitFailPoint);
regSchemalessFunc("enable_fail_point", DbgFailPointFunc::dbgEnableFailPoint);
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Debug/MockTiDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ TablePtr MockTiDB::getTableByNameInternal(const String & database_name, const St
auto it = tables_by_name.find(qualified_name);
if (it == tables_by_name.end())
{
throw Exception("Mock TiDB table " + qualified_name + " does not exists", ErrorCodes::UNKNOWN_TABLE);
throw Exception(ErrorCodes::UNKNOWN_TABLE, "Mock TiDB table {} does not exists", qualified_name);
}

return it->second;
Expand Down
57 changes: 0 additions & 57 deletions dbms/src/Debug/MockTiKV.h

This file was deleted.

Loading

0 comments on commit e795a89

Please sign in to comment.