Skip to content

Commit

Permalink
Merge branch 'master' into pagestorage-runmode-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
JaySon-Huang authored May 13, 2022
2 parents 3434d4f + 5985ad6 commit 4d9b282
Show file tree
Hide file tree
Showing 25 changed files with 151 additions and 482 deletions.
2 changes: 1 addition & 1 deletion contrib/tiflash-proxy
6 changes: 2 additions & 4 deletions dbms/src/Interpreters/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1650,10 +1650,8 @@ bool Context::initializeGlobalStoragePoolIfNeed(const PathPool & path_pool)
auto lock = getLock();
if (shared->global_storage_pool)
{
// Can't init GlobalStoragePool twice.
// Because we won't remove the gc task in BackGroundPool
// Also won't remove it from ~GlobalStoragePool()
throw Exception("GlobalStoragePool has already been initialized.", ErrorCodes::LOGICAL_ERROR);
// GlobalStoragePool may be initialized many times in some test cases for restore.
LOG_WARNING(shared->log, "GlobalStoragePool has already been initialized.");
}
CurrentMetrics::set(CurrentMetrics::GlobalStorageRunMode, static_cast<UInt8>(shared->storage_run_mode));
if (shared->storage_run_mode == PageStorageRunMode::MIX_MODE || shared->storage_run_mode == PageStorageRunMode::ONLY_V3)
Expand Down
8 changes: 1 addition & 7 deletions dbms/src/Interpreters/InterpreterFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <Interpreters/InterpreterSetQuery.h>
#include <Interpreters/InterpreterShowProcesslistQuery.h>
#include <Interpreters/InterpreterShowTablesQuery.h>
#include <Interpreters/InterpreterSystemQuery.h>
#include <Interpreters/InterpreterUseQuery.h>
#include <Parsers/ASTAlterQuery.h>
#include <Parsers/ASTCreateQuery.h>
Expand All @@ -42,7 +41,6 @@
#include <Parsers/ASTSetQuery.h>
#include <Parsers/ASTShowProcesslistQuery.h>
#include <Parsers/ASTShowTablesQuery.h>
#include <Parsers/ASTSystemQuery.h>
#include <Parsers/ASTUseQuery.h>
#include <Parsers/TablePropertiesQueriesASTs.h>

Expand Down Expand Up @@ -136,11 +134,7 @@ std::unique_ptr<IInterpreter> InterpreterFactory::get(ASTPtr & query, Context &
{
return std::make_unique<InterpreterDBGInvokeQuery>(query, context);
}
else if (typeid_cast<ASTSystemQuery *>(query.get()))
{
throwIfReadOnly(context);
return std::make_unique<InterpreterSystemQuery>(query, context);
}

else if (typeid_cast<ASTManageQuery *>(query.get()))
{
throwIfReadOnly(context);
Expand Down
131 changes: 0 additions & 131 deletions dbms/src/Interpreters/InterpreterSystemQuery.cpp

This file was deleted.

39 changes: 0 additions & 39 deletions dbms/src/Interpreters/InterpreterSystemQuery.h

This file was deleted.

84 changes: 0 additions & 84 deletions dbms/src/Parsers/ASTSystemQuery.cpp

This file was deleted.

67 changes: 0 additions & 67 deletions dbms/src/Parsers/ASTSystemQuery.h

This file was deleted.

3 changes: 0 additions & 3 deletions dbms/src/Parsers/ParserQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <Parsers/ParserQueryWithOutput.h>
#include <Parsers/ParserRenameQuery.h>
#include <Parsers/ParserSetQuery.h>
#include <Parsers/ParserSystemQuery.h>
#include <Parsers/ParserUseQuery.h>

namespace DB
Expand All @@ -34,15 +33,13 @@ bool ParserQuery::parseImpl(Pos & pos, ASTPtr & node, Expected & expected)
ParserUseQuery use_p;
ParserSetQuery set_p;
ParserDBGInvokeQuery dbginvoke_p;
ParserSystemQuery system_p;
ParserManageQuery manage_p;

bool res = query_with_output_p.parse(pos, node, expected)
|| insert_p.parse(pos, node, expected)
|| use_p.parse(pos, node, expected)
|| set_p.parse(pos, node, expected)
|| dbginvoke_p.parse(pos, node, expected)
|| system_p.parse(pos, node, expected)
|| manage_p.parse(pos, node, expected);

return res;
Expand Down
Loading

0 comments on commit 4d9b282

Please sign in to comment.