-
Notifications
You must be signed in to change notification settings - Fork 3.7k
CASSANDRA-13001 Implement appender of slow queries to system_views.slow_queries table #4067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
a794d28
to
0437269
Compare
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
@Override | ||
public void truncate() | ||
{ | ||
buffer.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth adding a debug logger message stating that the table has been truncated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think so, really.
{ | ||
// we restrict how many logging events we can put into buffer, | ||
// so we are not growing without any bound when things go south | ||
if (messageBuffer.size() < defaultRows) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a logger debug if message is not added to the buffer due to buffer size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would most probably cause a flood of debug messages every time we are "over the limit" unless the logger is no-spamming one. I would keep it like it is.
|
||
execute(query("truncate %s")); | ||
|
||
assertTrue(executeNet(query("select timestamp from %s")).all().isEmpty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use assertEmpty
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any simple way to do that because executeNet
returns ResultSet
from driver but assertEmpty
accepts UntypedResultSet
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/utils/logging/AbstractVirtualTableAppender.java
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/virtual/AbstractLoggerVirtualTable.java
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/db/monitoring/MonitoringTask.java
Outdated
Show resolved
Hide resolved
0437269
to
6e7872b
Compare
7a1f25c
to
dd6778e
Compare
patch by Stefan Miklosovic; reviewed by Dmitry Konstantinov, Bernardo Botella for CASSANDRA-13001
dd6778e
to
372d356
Compare
patch by Stefan Miklosovic; reviewed by TBD for CASSANDRA-13001
Thanks for sending a pull request! Here are some tips if you're new here:
Commit messages should follow the following format:
The Cassandra Jira