mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Instrument
This commit is contained in:
parent
6ff671b092
commit
21897f2abd
@ -203,6 +203,11 @@
|
||||
\
|
||||
M(CannotWriteToWriteBufferDiscard, "Number of stack traces dropped by query profiler or signal handler because pipe is full or cannot write to pipe.") \
|
||||
M(QueryProfilerSignalOverruns, "Number of times we drop processing of a signal due to overrun plus the number of signals that OS has not delivered due to overrun.") \
|
||||
\
|
||||
M(CreatedLogEntryForMerge, "Successfully created log entry to merge parts in ReplicatedMergeTree.") \
|
||||
M(NotCreatedLogEntryForMerge, "Log entry to merge parts in ReplicatedMergeTree is not created due to concurrent log update by another replica.") \
|
||||
M(CreatedLogEntryForMutation, "Successfully created log entry to mutate parts in ReplicatedMergeTree.") \
|
||||
M(NotCreatedLogEntryForMutation, "Log entry to mutate parts in ReplicatedMergeTree is not created due to concurrent log update by another replica.") \
|
||||
|
||||
namespace ProfileEvents
|
||||
{
|
||||
|
@ -71,6 +71,10 @@ namespace ProfileEvents
|
||||
extern const Event ReplicatedPartFetches;
|
||||
extern const Event DataAfterMergeDiffersFromReplica;
|
||||
extern const Event DataAfterMutationDiffersFromReplica;
|
||||
extern const Event CreatedLogEntryForMerge;
|
||||
extern const Event NotCreatedLogEntryForMerge;
|
||||
extern const Event CreatedLogEntryForMutation;
|
||||
extern const Event NotCreatedLogEntryForMutation;
|
||||
}
|
||||
|
||||
namespace CurrentMetrics
|
||||
@ -2579,10 +2583,12 @@ StorageReplicatedMergeTree::CreateMergeEntryResult StorageReplicatedMergeTree::c
|
||||
String path_created = dynamic_cast<const Coordination::CreateResponse &>(*responses.front()).path_created;
|
||||
entry.znode_name = path_created.substr(path_created.find_last_of('/') + 1);
|
||||
|
||||
ProfileEvents::increment(ProfileEvents::CreatedLogEntryForMerge);
|
||||
LOG_TRACE(log, "Created log entry {} for merge {}", path_created, merged_name);
|
||||
}
|
||||
else if (code == Coordination::Error::ZBADVERSION)
|
||||
{
|
||||
ProfileEvents::increment(ProfileEvents::NotCreatedLogEntryForMerge);
|
||||
LOG_TRACE(log, "Log entry is not created for merge {} because log was updated", merged_name);
|
||||
return CreateMergeEntryResult::LogUpdated;
|
||||
}
|
||||
@ -2643,12 +2649,14 @@ StorageReplicatedMergeTree::CreateMergeEntryResult StorageReplicatedMergeTree::c
|
||||
|
||||
if (code == Coordination::Error::ZBADVERSION)
|
||||
{
|
||||
ProfileEvents::increment(ProfileEvents::NotCreatedLogEntryForMutation);
|
||||
LOG_TRACE(log, "Log entry is not created for mutation {} because log was updated", new_part_name);
|
||||
return CreateMergeEntryResult::LogUpdated;
|
||||
}
|
||||
|
||||
zkutil::KeeperMultiException::check(code, ops, responses);
|
||||
|
||||
ProfileEvents::increment(ProfileEvents::CreatedLogEntryForMutation);
|
||||
LOG_TRACE(log, "Created log entry for mutation {}", new_part_name);
|
||||
return CreateMergeEntryResult::Ok;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user