YUKI Hiroshi
null+****@clear*****
Thu Dec 18 14:30:24 JST 2014
YUKI Hiroshi 2014-12-18 14:30:24 +0900 (Thu, 18 Dec 2014) New Revision: 7f06f13546bafb0c3cafd67663a049bb628c0d25 https://github.com/droonga/droonga-engine/commit/7f06f13546bafb0c3cafd67663a049bb628c0d25 Message: Separate buffers to 2 levels. accidental buffer => for accidentally dead nodes intentional buffer => for temporary unjoined nodes while absorbing data Modified files: lib/droonga/fluent_message_sender.rb lib/droonga/forwarder.rb lib/droonga/path.rb Modified: lib/droonga/fluent_message_sender.rb (+1 -1) =================================================================== --- lib/droonga/fluent_message_sender.rb 2014-12-16 19:27:30 +0900 (526c862) +++ lib/droonga/fluent_message_sender.rb 2014-12-18 14:30:24 +0900 (9259c47) @@ -84,7 +84,7 @@ module Droonga end if @buffering - data_directory = Path.buffer + "#{@host}:#{@port}" + data_directory = Path.accidental_buffer + "#{@host}:#{@port}" FileUtils.mkdir_p(data_directory.to_s) @socket = BufferedTCPSocket.connect(@host, @port, data_directory) @socket.resume Modified: lib/droonga/forwarder.rb (+2 -2) =================================================================== --- lib/droonga/forwarder.rb 2014-12-16 19:27:30 +0900 (ec689fa) +++ lib/droonga/forwarder.rb 2014-12-18 14:30:24 +0900 (52e938b) @@ -55,8 +55,8 @@ module Droonga end def resume - return unless Path.buffer.exist? - Pathname.glob("#{Path.buffer}/*") do |path| + return unless Path.accidental_buffer.exist? + Pathname.glob("#{Path.accidental_buffer}/*") do |path| next unless path.directory? destination = path.basename.to_s Modified: lib/droonga/path.rb (+6 -2) =================================================================== --- lib/droonga/path.rb 2014-12-16 19:27:30 +0900 (52ca600) +++ lib/droonga/path.rb 2014-12-18 14:30:24 +0900 (806c887) @@ -65,8 +65,12 @@ module Droonga Pathname.new(base_file_name).expand_path(base) end - def buffer - state + "buffer" + def accidental_buffer + state + "buffer" + "accidental" + end + + def intentional_buffer + state + "buffer" + "intentional" end def serf_event_handler_errors -------------- next part -------------- HTML����������������������������... Descargar