[Groonga-commit] groonga/groonga-query-log at 29bdf4c [master] Don't create statistic when command is missing

Back to archive index

Kentaro Hayashi null+****@clear*****
Wed May 31 15:20:16 JST 2017


Kentaro Hayashi	2017-05-31 15:20:16 +0900 (Wed, 31 May 2017)

  New Revision: 29bdf4cb5341224a83c45575a685e48a593734d2
  https://github.com/groonga/groonga-query-log/commit/29bdf4cb5341224a83c45575a685e48a593734d2

  Merged afd6ad0: Merge pull request #23 from kenhys/empty-command

  Message:
    Don't create statistic when command is missing
    
    For example, empty command is logged in query log,
    it raises exception.
    
      > (empty)
    
    TODO: write test case

  Modified files:
    lib/groonga/query-log/parser.rb

  Modified: lib/groonga/query-log/parser.rb (+1 -0)
===================================================================
--- lib/groonga/query-log/parser.rb    2017-05-31 14:57:45 +0900 (74de193)
+++ lib/groonga/query-log/parser.rb    2017-05-31 15:20:16 +0900 (556dd3a)
@@ -64,6 +64,7 @@ module Groonga
       def parse_line(time_stamp, context_id, type, rest, &block)
         case type
         when ">"
+          return if rest.empty?
           statistic = create_statistic(context_id)
           statistic.start(time_stamp, rest)
           @parsing_statistics[context_id] = statistic
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index