[Groonga-commit] droonga/fluent-plugin-droonga at 1ae7f34 [master] Don't add new record if there is any error

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 26 17:32:50 JST 2013


YUKI Hiroshi	2013-12-26 17:32:50 +0900 (Thu, 26 Dec 2013)

  New Revision: 1ae7f34e3e6b91be4b6d563e281d1c1cc79807a7
  https://github.com/droonga/fluent-plugin-droonga/commit/1ae7f34e3e6b91be4b6d563e281d1c1cc79807a7

  Message:
    Don't add new record if there is any error

  Modified files:
    lib/droonga/plugin/handler/add.rb

  Modified: lib/droonga/plugin/handler/add.rb (+2 -0)
===================================================================
--- lib/droonga/plugin/handler/add.rb    2013-12-26 17:30:45 +0900 (57f68a7)
+++ lib/droonga/plugin/handler/add.rb    2013-12-26 17:32:50 +0900 (5ff0a2f)
@@ -94,6 +94,8 @@ module Droonga
           raise InvalidValue.new(column, value, request)
         rescue ArgumentError => error
           raise InvalidValue.new(column, value, request)
+        ensure
+          record.delete if record.added?
         end
       end
     end
-------------- next part --------------
HTML����������������������������...
Download 



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