virajjasani commented on a change in pull request #754: HBASE-22978 : Online 
slow response log
URL: https://github.com/apache/hbase/pull/754#discussion_r382535946
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 ##########
 @@ -590,6 +596,10 @@ public HRegionServer(final Configuration conf) throws 
IOException {
       this.abortRequested = false;
       this.stopped = false;
 
+      // initiate online slowlog ringbuffer only for RegionServers
+      if (!(this instanceof HMaster)) {
 
 Review comment:
   If we don't initialize this and if user tries to retrieve 
get_slow_responses, request can't go to `SlowLogRecorder`. We should let the 
request go there and return empty response since queue is empty. And when user 
realize that he is getting empty response because he has not enabled required 
config, he will enable it, in fact he can enable it dynamically. Dynamic config 
support is also on the way in follow up task. So, we should initialize this 
object and let the object determine if queue is to be created based on config 
and if so, what is the size limit of queue etc.
   `HRegionServer` is not the one to decide queue creation, `SlowLogRecorder` 
is the one :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to