groonga-schema 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4263ea2b622faf07dde90bbf256235c636287fc9
4
- data.tar.gz: 103bdca013e9f45a0aaeeb440054eed76df0b900
3
+ metadata.gz: ed7bb6c859087835009b8057710920dbf9e93fea
4
+ data.tar.gz: 9037f722c24d049025a76174f04d0b060348e349
5
5
  SHA512:
6
- metadata.gz: 53d4be054208120b9f7e8afbac2c5e605bb2929878718cfc6a5f7b6681d794236238d9365a508a1b8ecb9af0fe7cfc5cf2de315bed75748ec505bb5326185933
7
- data.tar.gz: 6e70cdcdab3aee8125cbde03d2e95f0487fcca9464bfabd5aae356240d4f837d99d43b96e5710e284b869a5d420f320ed890c5a2fcaaad229dc505f8608469a6
6
+ metadata.gz: 29de4ac44587999452ce0cc3c0bd7ae5ab4022d5731efbd1ff478d27d9edca40362fa93553e1a53053dff94ba960fddf6cdc1623e32fddd27ba32af78604593f
7
+ data.tar.gz: 6ba55f5474701622d8b46351a5ca6a4d5cb35874349fcfe721e2e0d4f703d65fbf9bebfaf80a30833dde4d8cd9dc16c80bc514bf69a61fb45355df1aadf71ee8
data/README.md CHANGED
@@ -135,6 +135,67 @@ load --table Logs
135
135
  `Logs.timestamp` column's value type is changed to `Time` from
136
136
  `ShortText` and data are also converted.
137
137
 
138
+ You can also use `groonga-schema-diff` to remote databases.
139
+
140
+ The following command line shows difference between databases served
141
+ at `http://192.168.0.1:10041` and `http://192.168.0.2:10041/`:
142
+
143
+ ```text
144
+ % groonga-schema-diff \
145
+ 'http://192.168.0.1:10041/d/dump?dump_records=no' \
146
+ 'http://192.168.0.2:10041/d/dump?dump_records=no'
147
+ ```
148
+
149
+ You can apply the output Groonga command list by `groonga-client`
150
+ command provided by `groonga-client-cli` gem:
151
+
152
+ ```text
153
+ % groonga-client --host 192.168.0.1 diff.grn
154
+ ```
155
+
156
+ The following command synchronizes schema at
157
+ `http://192.168.0.1:10041/` with schema at `http://192.168.0.1:10042/`:
158
+
159
+ ```text
160
+ % groonga-schema-diff \
161
+ 'http://192.168.0.1:10041/d/dump?dump_records=no' \
162
+ 'http://192.168.0.2:10041/d/dump?dump_records=no' |
163
+ groonga-client --host 192.168.0.1
164
+ ```
165
+
166
+ After this command line, the following command line outputs nothing
167
+ because there are no difference between schema at
168
+ `http://192.168.0.1:10041/` and `http://192.168.0.1:10042/`:
169
+
170
+ ```text
171
+ % groonga-schema-diff \
172
+ 'http://192.168.0.1:10041/d/dump?dump_records=no' \
173
+ 'http://192.168.0.2:10041/d/dump?dump_records=no'
174
+ %
175
+ ```
176
+
177
+ NOTE: You should use database carefully while applying
178
+ changes. Because some tables and columns may be removed while applying
179
+ changes. If you touch removed tables and/or columns from another
180
+ threads, Groonga may be crashed. It's better that you reduce the max
181
+ number of threads to 1 while applying changes like the following:
182
+
183
+ ```text
184
+ % echo thread_limit 1 | groonga-client --host 192.168.0.1
185
+ % groonga-schema-diff \
186
+ 'http://192.168.0.1:10041/d/dump?dump_records=no' \
187
+ 'http://192.168.0.2:10041/d/dump?dump_records=no' |
188
+ groonga-client --host 192.168.0.1
189
+ % echo thread_limit 8 | groonga-client --host 192.168.0.1
190
+ ```
191
+
192
+ NOTE: You can't use the `thread_limit` technique with `groonga-httpd`
193
+ because `groonga-httpd` is multi-process model not multi-threading
194
+ model. You need to reduce the number of workers by changing
195
+ `worker_processes` to `1` in `groonga-httpd.conf` and reload the
196
+ configuration file. You also need to increase the number of workers
197
+ after you apply the changes.
198
+
138
199
  ### As a library
139
200
 
140
201
  TODO...
@@ -1,5 +1,11 @@
1
1
  # News
2
2
 
3
+ ## 1.0.1: 2016-08-16
4
+
5
+ ### Improvements
6
+
7
+ * Reduced memory usage when schema includes large load command.
8
+
3
9
  ## 1.0.0: 2016-08-16
4
10
 
5
11
  The first release!!!
@@ -82,6 +82,9 @@ module GroongaSchema
82
82
  parser.on_command do |command|
83
83
  schema.apply_command(command)
84
84
  end
85
+ parser.on_load_value do |command,|
86
+ command.original_source.clear
87
+ end
85
88
  resource.each_line do |line|
86
89
  parser << line
87
90
  end
@@ -15,5 +15,5 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module GroongaSchema
18
- VERSION = "1.0.0"
18
+ VERSION = "1.0.1"
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou