clickhouse: Chunks: added logging [#CONV-6705].

This commit is contained in:
Michael Kolupaev 2013-02-11 12:28:43 +00:00
parent 97287129aa
commit 4ed6c86648
2 changed files with 5 additions and 1 deletions

View File

@ -66,6 +66,8 @@ private:
CounterInFile reference_counter;
Context context;
Logger * log;
StorageChunks(const std::string & path_,
const std::string & name_,
const std::string & database_name_,

View File

@ -76,7 +76,7 @@ BlockOutputStreamPtr StorageChunks::writeToNewChunk(
}
StorageChunks::StorageChunks(const std::string & path_, const std::string & name_, const std::string & database_name_, NamesAndTypesListPtr columns_, Context & context_, bool attach)
: StorageLog(path_, name_, columns_), database_name(database_name_), index_loaded(false), reference_counter(path_ + escapeForFileName(name_) + "/refcount.txt"), context(context_)
: StorageLog(path_, name_, columns_), database_name(database_name_), index_loaded(false), reference_counter(path_ + escapeForFileName(name_) + "/refcount.txt"), context(context_), log(&Logger::get("StorageChunks"))
{
if (!attach)
reference_counter.add(1, true);
@ -119,6 +119,8 @@ void StorageChunks::appendChunkToIndex(const std::string & chunk_name, size_t ma
void StorageChunks::dropThis()
{
LOG_TRACE(log, "Table " << name << " will drop itself.");
ASTDropQuery * query = new ASTDropQuery();
ASTPtr query_ptr = query;
query->detach = false;