groonga-schema 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/README.md +61 -0
- data/doc/text/news.md +6 -0
- data/lib/groonga-schema/command-line/groonga-schema-diff.rb +3 -0
- data/lib/groonga-schema/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed7bb6c859087835009b8057710920dbf9e93fea
|
4
|
+
data.tar.gz: 9037f722c24d049025a76174f04d0b060348e349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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...
|
data/doc/text/news.md
CHANGED