droonga-engine 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/benchmark/timer-watcher/benchmark.rb +44 -0
  4. data/bin/droonga-engine-absorb-data +246 -187
  5. data/bin/droonga-engine-catalog-generate +12 -12
  6. data/bin/droonga-engine-catalog-modify +4 -4
  7. data/bin/droonga-engine-join +352 -171
  8. data/bin/droonga-engine-set-role +54 -0
  9. data/bin/droonga-engine-unjoin +107 -112
  10. data/droonga-engine.gemspec +3 -3
  11. data/install.sh +55 -36
  12. data/install/centos/functions.sh +2 -2
  13. data/install/debian/functions.sh +2 -2
  14. data/lib/droonga/address.rb +26 -24
  15. data/lib/droonga/buffered_tcp_socket.rb +65 -10
  16. data/lib/droonga/catalog/base.rb +9 -6
  17. data/lib/droonga/catalog/dataset.rb +17 -41
  18. data/lib/droonga/catalog/fetcher.rb +64 -0
  19. data/lib/droonga/catalog/generator.rb +245 -0
  20. data/lib/droonga/catalog/loader.rb +66 -0
  21. data/lib/droonga/{catalog_modifier.rb → catalog/modifier.rb} +11 -18
  22. data/lib/droonga/catalog/replicas_volume.rb +123 -0
  23. data/lib/droonga/catalog/schema.rb +37 -37
  24. data/lib/droonga/catalog/single_volume.rb +11 -3
  25. data/lib/droonga/catalog/slice.rb +10 -6
  26. data/lib/droonga/catalog/{collection_volume.rb → slices_volume.rb} +47 -11
  27. data/lib/droonga/catalog/version1.rb +47 -19
  28. data/lib/droonga/catalog/version2.rb +11 -10
  29. data/lib/droonga/catalog/version2_validator.rb +4 -4
  30. data/lib/droonga/catalog/volume.rb +17 -5
  31. data/lib/droonga/changable.rb +25 -0
  32. data/lib/droonga/cluster.rb +237 -0
  33. data/lib/droonga/collector_runner.rb +4 -0
  34. data/lib/droonga/collectors.rb +2 -1
  35. data/lib/droonga/collectors/recursive_sum.rb +26 -0
  36. data/lib/droonga/command/droonga_engine.rb +404 -127
  37. data/lib/droonga/command/droonga_engine_service.rb +47 -11
  38. data/lib/droonga/command/droonga_engine_worker.rb +21 -1
  39. data/lib/droonga/command/remote_command_base.rb +78 -0
  40. data/lib/droonga/command/serf_event_handler.rb +29 -20
  41. data/lib/droonga/data_absorber_client.rb +222 -0
  42. data/lib/droonga/database_scanner.rb +106 -0
  43. data/lib/droonga/{live_nodes_list_loader.rb → deferrable.rb} +11 -24
  44. data/lib/droonga/differ.rb +58 -0
  45. data/lib/droonga/dispatcher.rb +155 -32
  46. data/lib/droonga/distributed_command_planner.rb +9 -11
  47. data/lib/droonga/engine.rb +83 -78
  48. data/lib/droonga/engine/version.rb +1 -1
  49. data/lib/droonga/engine_node.rb +301 -0
  50. data/lib/droonga/engine_state.rb +62 -40
  51. data/lib/droonga/farm.rb +44 -5
  52. data/lib/droonga/file_observer.rb +16 -12
  53. data/lib/droonga/fluent_message_receiver.rb +98 -29
  54. data/lib/droonga/fluent_message_sender.rb +30 -23
  55. data/lib/droonga/forward_buffer.rb +160 -0
  56. data/lib/droonga/forwarder.rb +73 -40
  57. data/lib/droonga/handler.rb +7 -6
  58. data/lib/droonga/handler_messenger.rb +15 -6
  59. data/lib/droonga/handler_runner.rb +6 -1
  60. data/lib/droonga/internal_fluent_message_receiver.rb +28 -8
  61. data/lib/droonga/job_pusher.rb +10 -7
  62. data/lib/droonga/job_receiver.rb +6 -4
  63. data/lib/droonga/logger.rb +7 -1
  64. data/lib/droonga/node_name.rb +90 -0
  65. data/lib/droonga/node_role.rb +72 -0
  66. data/lib/droonga/path.rb +34 -9
  67. data/lib/droonga/planner.rb +73 -7
  68. data/lib/droonga/plugin/async_command.rb +154 -0
  69. data/lib/droonga/plugins/catalog.rb +1 -0
  70. data/lib/droonga/plugins/crud.rb +22 -6
  71. data/lib/droonga/plugins/dump.rb +66 -135
  72. data/lib/droonga/plugins/groonga/delete.rb +13 -0
  73. data/lib/droonga/plugins/search/distributed_search_planner.rb +4 -4
  74. data/lib/droonga/plugins/system.rb +5 -26
  75. data/lib/droonga/plugins/system/absorb_data.rb +405 -0
  76. data/lib/droonga/plugins/system/statistics.rb +71 -0
  77. data/lib/droonga/plugins/system/status.rb +53 -0
  78. data/lib/droonga/process_control_protocol.rb +3 -1
  79. data/lib/droonga/process_supervisor.rb +32 -15
  80. data/lib/droonga/reducer.rb +69 -0
  81. data/lib/droonga/safe_file_writer.rb +1 -1
  82. data/lib/droonga/serf.rb +207 -276
  83. data/lib/droonga/serf/agent.rb +228 -0
  84. data/lib/droonga/serf/command.rb +94 -0
  85. data/lib/droonga/serf/downloader.rb +120 -0
  86. data/lib/droonga/serf/remote_command.rb +348 -0
  87. data/lib/droonga/serf/tag.rb +56 -0
  88. data/lib/droonga/service_installation.rb +2 -2
  89. data/lib/droonga/session.rb +49 -1
  90. data/lib/droonga/single_step.rb +6 -11
  91. data/lib/droonga/single_step_definition.rb +32 -1
  92. data/lib/droonga/slice.rb +14 -9
  93. data/lib/droonga/supervisor.rb +27 -20
  94. data/lib/droonga/test/stub_handler_messenger.rb +2 -1
  95. data/lib/droonga/timestamp.rb +69 -0
  96. data/lib/droonga/worker_process_agent.rb +33 -15
  97. data/sample/cluster-state.json +8 -0
  98. data/sample/cluster/Rakefile +30 -6
  99. data/test/command/fixture/integer-key-table.jsons +11 -0
  100. data/test/command/fixture/string-key-table.jsons +11 -0
  101. data/test/command/run-test.rb +4 -0
  102. data/test/command/suite/add/error/invalid-integer.expected +3 -3
  103. data/test/command/suite/add/error/invalid-time.expected +3 -3
  104. data/test/command/suite/add/{minimum.expected → key-integer.expected} +0 -0
  105. data/test/command/suite/add/{minimum.test → key-integer.test} +0 -0
  106. data/test/command/suite/add/key-string.expected +6 -0
  107. data/test/command/suite/add/key-string.test +9 -0
  108. data/test/command/suite/add/mismatched-key-type/acceptable/integer-for-string.expected +6 -0
  109. data/test/command/suite/add/mismatched-key-type/acceptable/integer-for-string.test +9 -0
  110. data/test/command/suite/add/mismatched-key-type/acceptable/string-for-integer.expected +6 -0
  111. data/test/command/suite/add/mismatched-key-type/acceptable/string-for-integer.test +9 -0
  112. data/test/command/suite/add/without-values.expected +6 -0
  113. data/test/command/suite/add/without-values.test +11 -0
  114. data/test/command/suite/dump/column/index.expected +33 -1
  115. data/test/command/suite/dump/column/index.test +1 -0
  116. data/test/command/suite/dump/column/scalar.expected +29 -1
  117. data/test/command/suite/dump/column/scalar.test +1 -0
  118. data/test/command/suite/dump/column/vector.expected +29 -1
  119. data/test/command/suite/dump/column/vector.test +1 -0
  120. data/test/command/suite/dump/record/scalar.catalog.json +12 -0
  121. data/test/command/suite/dump/record/scalar.expected +84 -0
  122. data/test/command/suite/dump/record/scalar.test +16 -0
  123. data/test/command/suite/dump/record/vector/reference.expected +83 -1
  124. data/test/command/suite/dump/record/vector/reference.test +1 -0
  125. data/test/command/suite/dump/table/array.expected +27 -1
  126. data/test/command/suite/dump/table/array.test +1 -0
  127. data/test/command/suite/dump/table/double_array_trie.expected +27 -1
  128. data/test/command/suite/dump/table/double_array_trie.test +1 -0
  129. data/test/command/suite/dump/table/hash.expected +27 -1
  130. data/test/command/suite/dump/table/hash.test +1 -0
  131. data/test/command/suite/dump/table/patricia_trie.expected +27 -1
  132. data/test/command/suite/dump/table/patricia_trie.test +1 -0
  133. data/test/command/suite/groonga/delete/{success.expected → key-integer.expected} +0 -0
  134. data/test/command/suite/groonga/delete/key-integer.test +17 -0
  135. data/test/command/suite/groonga/delete/key-string.expected +19 -0
  136. data/test/command/suite/groonga/delete/{success.test → key-string.test} +4 -6
  137. data/test/command/suite/groonga/delete/mismatched-type-key/acceptable/integer-for-string.expected +19 -0
  138. data/test/command/suite/groonga/delete/mismatched-type-key/acceptable/integer-for-string.test +17 -0
  139. data/test/command/suite/groonga/delete/mismatched-type-key/acceptable/string-for-integer.expected +19 -0
  140. data/test/command/suite/groonga/delete/mismatched-type-key/acceptable/string-for-integer.test +17 -0
  141. data/test/command/suite/message/error/missing-dataset.test +1 -0
  142. data/test/command/suite/system/absorb-data/records.catalog.json +58 -0
  143. data/test/command/suite/system/absorb-data/records.expected +32 -0
  144. data/test/command/suite/system/absorb-data/records.test +24 -0
  145. data/test/command/suite/system/statistics/object/count/empty.expected +11 -0
  146. data/test/command/suite/system/statistics/object/count/empty.test +12 -0
  147. data/test/command/suite/system/statistics/object/count/per-volume/empty.catalog.json +36 -0
  148. data/test/command/suite/system/statistics/object/count/per-volume/empty.expected +19 -0
  149. data/test/command/suite/system/statistics/object/count/per-volume/empty.test +12 -0
  150. data/test/command/suite/system/statistics/object/count/per-volume/record.catalog.json +40 -0
  151. data/test/command/suite/system/statistics/object/count/per-volume/record.expected +19 -0
  152. data/test/command/suite/system/statistics/object/count/per-volume/record.test +23 -0
  153. data/test/command/suite/system/statistics/object/count/per-volume/schema.catalog.json +40 -0
  154. data/test/command/suite/system/statistics/object/count/per-volume/schema.expected +19 -0
  155. data/test/command/suite/system/statistics/object/count/per-volume/schema.test +13 -0
  156. data/test/command/suite/system/statistics/object/count/record.catalog.json +12 -0
  157. data/test/command/suite/system/statistics/object/count/record.expected +11 -0
  158. data/test/command/suite/system/statistics/object/count/record.test +23 -0
  159. data/test/command/suite/system/statistics/object/count/schema.catalog.json +12 -0
  160. data/test/command/suite/system/statistics/object/count/schema.expected +11 -0
  161. data/test/command/suite/system/statistics/object/count/schema.test +13 -0
  162. data/test/command/suite/system/status.expected +3 -2
  163. data/test/unit/catalog/test_dataset.rb +4 -1
  164. data/test/unit/{test_catalog_generator.rb → catalog/test_generator.rb} +2 -2
  165. data/test/unit/catalog/test_replicas_volume.rb +79 -0
  166. data/test/unit/catalog/test_single_volume.rb +2 -2
  167. data/test/unit/catalog/test_slice.rb +33 -1
  168. data/test/unit/catalog/{test_collection_volume.rb → test_slices_volume.rb} +72 -11
  169. data/test/unit/catalog/test_version2.rb +3 -0
  170. data/test/unit/helper/distributed_search_planner_helper.rb +2 -2
  171. data/test/unit/plugins/catalog/test_fetch.rb +4 -4
  172. data/test/unit/plugins/crud/test_add.rb +44 -4
  173. data/test/unit/plugins/groonga/test_column_create.rb +4 -4
  174. data/test/unit/plugins/groonga/test_column_list.rb +4 -4
  175. data/test/unit/plugins/groonga/test_column_remove.rb +4 -4
  176. data/test/unit/plugins/groonga/test_column_rename.rb +4 -4
  177. data/test/unit/plugins/groonga/test_delete.rb +73 -10
  178. data/test/unit/plugins/groonga/test_table_create.rb +4 -4
  179. data/test/unit/plugins/groonga/test_table_list.rb +4 -4
  180. data/test/unit/plugins/groonga/test_table_remove.rb +4 -4
  181. data/test/unit/plugins/search/test_handler.rb +4 -4
  182. data/test/unit/plugins/search/test_planner.rb +4 -2
  183. data/test/unit/plugins/system/test_status.rb +31 -15
  184. data/test/unit/plugins/test_watch.rb +16 -16
  185. data/test/unit/test_address.rb +4 -4
  186. metadata +134 -35
  187. data/lib/droonga/catalog/volume_collection.rb +0 -79
  188. data/lib/droonga/catalog_fetcher.rb +0 -53
  189. data/lib/droonga/catalog_generator.rb +0 -243
  190. data/lib/droonga/catalog_loader.rb +0 -56
  191. data/lib/droonga/command/remote.rb +0 -404
  192. data/lib/droonga/data_absorber.rb +0 -264
  193. data/lib/droonga/node_status.rb +0 -71
  194. data/lib/droonga/serf_downloader.rb +0 -115
  195. data/test/unit/catalog/test_volume_collection.rb +0 -78
@@ -17,12 +17,13 @@ module Droonga
17
17
  module Test
18
18
  class StubHandlerMessenger
19
19
  attr_reader :values, :messages
20
- attr_accessor :engine_state
20
+ attr_accessor :engine_state, :cluster
21
21
 
22
22
  def initialize
23
23
  @values = []
24
24
  @messages = []
25
25
  @engine_state = nil
26
+ @cluster = nil
26
27
  end
27
28
 
28
29
  def emit(value)
@@ -0,0 +1,69 @@
1
+ # Copyright (C) 2015 Droonga Project
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License version 2.1 as published by the Free Software Foundation.
6
+ #
7
+ # This library is distributed in the hope that it will be useful,
8
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10
+ # Lesser General Public License for more details.
11
+ #
12
+ # You should have received a copy of the GNU Lesser General Public
13
+ # License along with this library; if not, write to the Free Software
14
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15
+
16
+ require "time"
17
+
18
+ require "droonga/path"
19
+ require "droonga/safe_file_writer"
20
+ require "droonga/file_observer"
21
+
22
+ module Droonga
23
+ module Timestamp
24
+ MICRO_SECONDS_DECIMAL_PLACE = 6
25
+
26
+ class << self
27
+ def stringify(timestamp)
28
+ timestamp.utc.iso8601(MICRO_SECONDS_DECIMAL_PLACE)
29
+ end
30
+
31
+ def last_message_timestamp=(timestamp)
32
+ if timestamp.is_a?(String)
33
+ timestamp = timestamp.strip
34
+ if timestamp.empty?
35
+ timestamp = nil
36
+ else
37
+ timestamp = Time.parse(timestamp)
38
+ end
39
+ end
40
+ if timestamp
41
+ timestamp = stringify(timestamp)
42
+ else
43
+ timestamp = ""
44
+ end
45
+ SafeFileWriter.write(Path.last_message_timestamp) do |output, file|
46
+ output.puts(timestamp)
47
+ end
48
+ end
49
+
50
+ def last_message_timestamp
51
+ file = Path.last_message_timestamp
52
+ return nil unless file.exist?
53
+ timestamp = file.read.strip
54
+ return nil if timestamp.nil? or timestamp.empty?
55
+ Time.parse(timestamp)
56
+ end
57
+
58
+ def run_last_message_timestamp_observer(loop, &block)
59
+ path = Path.last_message_timestamp
60
+ observer = FileObserver.new(loop, path)
61
+ observer.on_change = lambda do
62
+ yield(last_message_timestamp)
63
+ end
64
+ observer.start
65
+ observer
66
+ end
67
+ end
68
+ end
69
+ end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2014 Droonga Project
1
+ # Copyright (C) 2014-2015 Droonga Project
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -28,14 +28,16 @@ module Droonga
28
28
  @loop = loop
29
29
  create_input(input)
30
30
  create_output(output)
31
- @on_ready = nil
32
- @on_finish = nil
33
31
  end
34
32
 
35
33
  def start
36
34
  logger.trace("start: start")
37
35
  @loop.attach(@input)
36
+ # logger.trace("start: new input watcher attached",
37
+ # :watcher => @input)
38
38
  @loop.attach(@output)
39
+ # logger.trace("start: new output watcher attached",
40
+ # :watcher => @output)
39
41
  logger.trace("start: done")
40
42
  end
41
43
 
@@ -46,11 +48,15 @@ module Droonga
46
48
  output.write(Messages::FINISH)
47
49
  output.on_write_complete do
48
50
  output.close
51
+ logger.trace("stop: output detached",
52
+ :watcher => output)
49
53
  end
50
54
  end
51
55
  if @input
52
56
  @input, input = nil, @input
53
57
  input.close
58
+ logger.trace("stop: input detached",
59
+ :watcher => input)
54
60
  end
55
61
  logger.trace("stop: done")
56
62
  end
@@ -67,45 +73,49 @@ module Droonga
67
73
  @on_stop_immediately = callback
68
74
  end
69
75
 
76
+ def on_refresh_self_reference=(callback)
77
+ @on_refresh_self_reference = callback
78
+ end
79
+
80
+ def on_refresh_node_reference=(callback)
81
+ @on_refresh_node_reference = callback
82
+ end
83
+
70
84
  private
71
85
  def create_input(raw_input)
72
86
  @input = Coolio::IO.new(raw_input)
73
- on_read = lambda do |data|
87
+ @input.on_read do |data|
74
88
  line_buffer = LineBuffer.new
75
89
  line_buffer.feed(data) do |line|
90
+ logger.trace("line buffer feeded", :line => line);
76
91
  case line
77
92
  when Messages::STOP_GRACEFUL
78
93
  on_stop_gracefully
79
94
  when Messages::STOP_IMMEDIATELY
80
95
  on_stop_immediately
96
+ when Messages::REFRESH_SELF_REFERENCE
97
+ on_refresh_self_reference
98
+ when Messages::REFRESH_NODE_REFERENCE
99
+ on_refresh_node_reference
81
100
  end
82
101
  end
83
102
  end
84
- @input.on_read do |data|
85
- on_read.call(data)
86
- end
87
- on_close = lambda do
103
+ @input.on_close do
88
104
  if @input
89
105
  @input = nil
90
106
  on_stop_immediately
91
107
  end
92
108
  end
93
- @input.on_close do
94
- on_close.call
95
- end
96
109
  end
97
110
 
98
111
  def create_output(raw_output)
99
112
  @output = Coolio::IO.new(raw_output)
100
- on_close = lambda do
113
+ @output.on_close do
101
114
  if @output
102
115
  @output = nil
103
116
  on_stop_immediately
104
117
  end
105
118
  end
106
- @output.on_close do
107
- on_close.call
108
- end
109
119
  end
110
120
 
111
121
  def on_stop_gracefully
@@ -116,6 +126,14 @@ module Droonga
116
126
  @on_stop_immediately.call if @on_stop_immediately
117
127
  end
118
128
 
129
+ def on_refresh_self_reference
130
+ @on_refresh_self_reference.call if @on_refresh_self_reference
131
+ end
132
+
133
+ def on_refresh_node_reference
134
+ @on_refresh_node_reference.call if @on_refresh_node_reference
135
+ end
136
+
119
137
  def log_tag
120
138
  "worker_process_agent"
121
139
  end
@@ -0,0 +1,8 @@
1
+ {
2
+ "127.0.0.1:23003/droonga": {
3
+ "type": "engine",
4
+ "role": "service-provider",
5
+ "live": true,
6
+ "have_unprocessed_messages": false
7
+ }
8
+ }
@@ -17,6 +17,7 @@
17
17
 
18
18
  require "pathname"
19
19
  require "json"
20
+ require "yaml"
20
21
 
21
22
  base_dir_path = Pathname.new(__FILE__).dirname
22
23
  top_dir_path = base_dir_path.parent.parent
@@ -48,20 +49,22 @@ class DroongaEngine
48
49
  rm_rf(working_dir_path.to_s)
49
50
  mkdir_p(working_dir_path.to_s)
50
51
  generate_catalog(node_ids)
52
+ generate_config
51
53
  end
52
54
 
53
55
  def start
54
56
  @pid = spawn("droonga-engine",
55
- "--base-dir", working_dir_path.to_s,
56
- "--host", host,
57
- "--port", self.class.port.to_s,
58
- "--pid-file", pid_file_path.to_s)
57
+ "--base-dir", working_dir_path.to_s)
59
58
  end
60
59
 
61
60
  def stop
62
61
  Process.kill(:TERM, @pid)
63
62
  Process.waitpid(@pid)
64
63
  @pid = nil
64
+ if pid_path.exist?
65
+ pid = Integer(pid_path.read)
66
+ Process.kill(:TERM, pid)
67
+ end
65
68
  end
66
69
 
67
70
  def host
@@ -77,8 +80,16 @@ class DroongaEngine
77
80
  working_dir_path + "catalog.json"
78
81
  end
79
82
 
80
- def pid_file_path
81
- working_dir_path + "droonga-engine.pid"
83
+ def config_path
84
+ working_dir_path + "droonga-engine.yaml"
85
+ end
86
+
87
+ def pid_path_base_name
88
+ "droonga-engine.pid"
89
+ end
90
+
91
+ def pid_path
92
+ working_dir_path + pid_path_base_name
82
93
  end
83
94
 
84
95
  def generate_catalog(node_ids)
@@ -91,6 +102,19 @@ class DroongaEngine
91
102
  "--hosts", hosts.join(","),
92
103
  "--port", self.class.port.to_s)
93
104
  end
105
+
106
+ def generate_config
107
+ config = {
108
+ "host" => host,
109
+ "port" => self.class.port,
110
+ # "log_file" => "droonga-engine.log",
111
+ "log_level" => "info",
112
+ "pid_file" => pid_path_base_name,
113
+ }
114
+ config_path.open("w") do |file|
115
+ file.puts(config.to_yaml)
116
+ end
117
+ end
94
118
  end
95
119
 
96
120
  namespace :droonga do
@@ -0,0 +1,11 @@
1
+ #@disable-logging
2
+ {
3
+ "type": "table_create",
4
+ "dataset": "Default",
5
+ "body": {
6
+ "name" : "Integer",
7
+ "flags" : "TABLE_PAT_KEY",
8
+ "key_type" : "UInt32"
9
+ }
10
+ }
11
+ #@enable-logging
@@ -0,0 +1,11 @@
1
+ #@disable-logging
2
+ {
3
+ "type": "table_create",
4
+ "dataset": "Default",
5
+ "body": {
6
+ "name" : "String",
7
+ "flags" : "TABLE_PAT_KEY",
8
+ "key_type" : "ShortText"
9
+ }
10
+ }
11
+ #@enable-logging
@@ -39,9 +39,13 @@ end
39
39
 
40
40
  base_dir = File.dirname(__FILE__)
41
41
  lib_dir = File.expand_path(File.join(base_dir, "..", "..", "lib"))
42
+ log_path = File.expand_path(File.join(base_dir, "tmp", "droonga-engine.log"))
42
43
 
43
44
  drntest_options = []
44
45
  drntest_options.concat(["--base-path", base_dir])
46
+ drntest_options.concat(["--droonga-engine-options",
47
+ ["--log-file=#{log_path}",
48
+ "--internal-connection-lifetime=5"].join(" ")])
45
49
  drntest_options.concat(ARGV)
46
50
 
47
51
  run("bundle", "exec", "drntest", *drntest_options)
@@ -4,7 +4,7 @@
4
4
  "type": "add.result",
5
5
  "body": {
6
6
  "name": "InvalidValue",
7
- "message": "The column \"age\" cannot store the value \"secret\".",
7
+ "message": "The column \"age\" cannot store the value \"secret\": invalid argument: <User.age>: failed to cast to <Int32>: <\"secret\">: #<Groonga::FixSizeColumn ...>",
8
8
  "detail": {
9
9
  "table": "User",
10
10
  "key": "key",
@@ -18,7 +18,7 @@
18
18
  "statusCode": 400,
19
19
  "body": {
20
20
  "name": "InvalidValue",
21
- "message": "The column \"age\" cannot store the value \"secret\".",
21
+ "message": "The column \"age\" cannot store the value \"secret\": invalid argument: <User.age>: failed to cast to <Int32>: <\"secret\">: #<Groonga::FixSizeColumn ...>",
22
22
  "detail": {
23
23
  "table": "User",
24
24
  "key": "key",
@@ -32,7 +32,7 @@
32
32
  "statusCode": 400,
33
33
  "body": {
34
34
  "name": "InvalidValue",
35
- "message": "The column \"age\" cannot store the value \"secret\".",
35
+ "message": "The column \"age\" cannot store the value \"secret\": invalid argument: <User.age>: failed to cast to <Int32>: <\"secret\">: #<Groonga::FixSizeColumn ...>",
36
36
  "detail": {
37
37
  "table": "User",
38
38
  "key": "key",
@@ -4,7 +4,7 @@
4
4
  "type": "add.result",
5
5
  "body": {
6
6
  "name": "InvalidValue",
7
- "message": "The column \"birthday\" cannot store the value \"today\".",
7
+ "message": "The column \"birthday\" cannot store the value \"today\": no time information in \"today\"",
8
8
  "detail": {
9
9
  "table": "User",
10
10
  "key": "key",
@@ -18,7 +18,7 @@
18
18
  "statusCode": 400,
19
19
  "body": {
20
20
  "name": "InvalidValue",
21
- "message": "The column \"birthday\" cannot store the value \"today\".",
21
+ "message": "The column \"birthday\" cannot store the value \"today\": no time information in \"today\"",
22
22
  "detail": {
23
23
  "table": "User",
24
24
  "key": "key",
@@ -32,7 +32,7 @@
32
32
  "statusCode": 400,
33
33
  "body": {
34
34
  "name": "InvalidValue",
35
- "message": "The column \"birthday\" cannot store the value \"today\".",
35
+ "message": "The column \"birthday\" cannot store the value \"today\": no time information in \"today\"",
36
36
  "detail": {
37
37
  "table": "User",
38
38
  "key": "key",
@@ -0,0 +1,6 @@
1
+ {
2
+ "inReplyTo": "request-id",
3
+ "statusCode": 200,
4
+ "type": "add.result",
5
+ "body": true
6
+ }
@@ -0,0 +1,9 @@
1
+ #@include fixture/string-key-table.jsons
2
+ {
3
+ "type": "add",
4
+ "dataset": "Default",
5
+ "body": {
6
+ "table": "String",
7
+ "key": "key"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "inReplyTo": "request-id",
3
+ "statusCode": 200,
4
+ "type": "add.result",
5
+ "body": true
6
+ }
@@ -0,0 +1,9 @@
1
+ #@include fixture/string-key-table.jsons
2
+ {
3
+ "type": "add",
4
+ "dataset": "Default",
5
+ "body": {
6
+ "table": "String",
7
+ "key": 1
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "inReplyTo": "request-id",
3
+ "statusCode": 200,
4
+ "type": "add.result",
5
+ "body": true
6
+ }
@@ -0,0 +1,9 @@
1
+ #@include fixture/integer-key-table.jsons
2
+ {
3
+ "type": "add",
4
+ "dataset": "Default",
5
+ "body": {
6
+ "table": "Integer",
7
+ "key": "1"
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "inReplyTo": "request-id",
3
+ "statusCode": 200,
4
+ "type": "add.result",
5
+ "body": true
6
+ }
@@ -0,0 +1,11 @@
1
+ #@include fixture/user-table.jsons
2
+ {
3
+ "type": "add",
4
+ "dataset": "Default",
5
+ "body": {
6
+ "table": "User",
7
+ "key": "key",
8
+ "values": {
9
+ }
10
+ }
11
+ }