-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
logical_table_remove: start implementing "--force yes"
It's not completed yet.
- Loading branch information
Showing
9 changed files
with
720 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
test/command/suite/sharding/logical_table_remove/broken/table/default.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
plugin_register sharding | ||
[[0,0.0,0.0],true] | ||
table_create Paths_20150203 TABLE_HASH_KEY|KEY_LARGE ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Logs_20150203 TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150203 timestamp COLUMN_SCALAR Time | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150203 path COLUMN_SCALAR Paths_20150203 | ||
[[0,0.0,0.0],true] | ||
table_create Times_20150203 TABLE_PAT_KEY Time | ||
[[0,0.0,0.0],true] | ||
column_create Times_20150203 timestamp_index COLUMN_INDEX Logs_20150203 timestamp | ||
[[0,0.0,0.0],true] | ||
table_create PathTerms_20150203 TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto | ||
[[0,0.0,0.0],true] | ||
column_create PathTerms_20150203 index COLUMN_INDEX|WITH_POSITION Paths_20150203 _key | ||
[[0,0.0,0.0],true] | ||
table_create NotRelated_20150204 TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
table_create Paths_20150204 TABLE_HASH_KEY|KEY_LARGE ShortText | ||
[[0,0.0,0.0],true] | ||
table_create Logs_20150204 TABLE_NO_KEY | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150204 timestamp COLUMN_SCALAR Time | ||
[[0,0.0,0.0],true] | ||
column_create Logs_20150204 path COLUMN_SCALAR Paths_20150204 | ||
[[0,0.0,0.0],true] | ||
table_create Times_20150204 TABLE_PAT_KEY Time | ||
[[0,0.0,0.0],true] | ||
column_create Times_20150204 timestamp_index COLUMN_INDEX Logs_20150204 timestamp | ||
[[0,0.0,0.0],true] | ||
table_create PathTerms_20150204 TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto | ||
[[0,0.0,0.0],true] | ||
column_create PathTerms_20150204 index COLUMN_INDEX|WITH_POSITION Paths_20150204 _key | ||
[[0,0.0,0.0],true] | ||
load --table Logs_20150203 | ||
[ | ||
{"timestamp": "2015-02-03 12:49:00", "path": "/tmp/log"}, | ||
{"timestamp": "2015-02-03 23:59:59", "path": "/var/"} | ||
] | ||
[[0,0.0,0.0],2] | ||
load --table Logs_20150204 | ||
[ | ||
{"timestamp": "2015-02-04 00:00:00", "path": "/tmp/log"}, | ||
{"timestamp": "2015-02-04 13:49:00", "path": "/root/"}, | ||
{"timestamp": "2015-02-04 13:50:00", "path": "/etc/aliases"} | ||
] | ||
[[0,0.0,0.0],3] | ||
logical_table_remove Logs timestamp --min "2015-02-04 00:00:00" --min_border "include" | ||
[[[-22,0.0,0.0],"[logical_table_remove] table is broken: <Logs_20150204>"]] | ||
#|e| [io][open] file size is too small: <8>(required: >= 64): <db/db.0000110> | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
dump | ||
plugin_register sharding | ||
|
||
table_create Logs_20150203 TABLE_NO_KEY | ||
column_create Logs_20150203 timestamp COLUMN_SCALAR Time | ||
|
||
table_create NotRelated_20150204 TABLE_NO_KEY | ||
|
||
table_create PathTerms_20150203 TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto | ||
|
||
table_create PathTerms_20150204 TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerAuto | ||
|
||
table_create Paths_20150203 TABLE_HASH_KEY|KEY_LARGE ShortText | ||
|
||
table_create Paths_20150204 TABLE_HASH_KEY|KEY_LARGE ShortText | ||
|
||
table_create Times_20150203 TABLE_PAT_KEY Time | ||
|
||
table_create Times_20150204 TABLE_PAT_KEY Time | ||
|
||
column_create Logs_20150203 path COLUMN_SCALAR Paths_20150203 | ||
|
||
load --table Paths_20150203 | ||
[ | ||
["_key"], | ||
["/tmp/log"], | ||
["/var/"] | ||
] | ||
|
||
load --table Logs_20150203 | ||
[ | ||
["_id","path","timestamp"], | ||
[1,"/tmp/log",1422935340.0], | ||
[2,"/var/",1422975599.0] | ||
] | ||
|
||
load --table Paths_20150204 | ||
[ | ||
["_key"], | ||
["/tmp/log"], | ||
["/root/"], | ||
["/etc/aliases"] | ||
] | ||
|
||
column_create PathTerms_20150203 index COLUMN_INDEX|WITH_POSITION Paths_20150203 _key | ||
column_create PathTerms_20150204 index COLUMN_INDEX|WITH_POSITION Paths_20150204 _key | ||
column_create Times_20150203 timestamp_index COLUMN_INDEX Logs_20150203 timestamp | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) | ||
#|e| grn_ctx_at: failed to open object: <272>(<Logs_20150204>):<51>(<table:no_key>) |
59 changes: 59 additions & 0 deletions
59
test/command/suite/sharding/logical_table_remove/broken/table/default.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#@on-error omit | ||
plugin_register sharding | ||
#@on-error default | ||
|
||
table_create Paths_20150203 TABLE_HASH_KEY|KEY_LARGE ShortText | ||
table_create Logs_20150203 TABLE_NO_KEY | ||
column_create Logs_20150203 timestamp COLUMN_SCALAR Time | ||
column_create Logs_20150203 path COLUMN_SCALAR Paths_20150203 | ||
table_create Times_20150203 TABLE_PAT_KEY Time | ||
column_create Times_20150203 timestamp_index COLUMN_INDEX Logs_20150203 timestamp | ||
|
||
table_create PathTerms_20150203 TABLE_PAT_KEY ShortText \ | ||
--default_tokenizer TokenBigram \ | ||
--normalizer NormalizerAuto | ||
column_create PathTerms_20150203 index COLUMN_INDEX|WITH_POSITION \ | ||
Paths_20150203 _key | ||
|
||
|
||
table_create NotRelated_20150204 TABLE_NO_KEY | ||
|
||
table_create Paths_20150204 TABLE_HASH_KEY|KEY_LARGE ShortText | ||
table_create Logs_20150204 TABLE_NO_KEY | ||
column_create Logs_20150204 timestamp COLUMN_SCALAR Time | ||
column_create Logs_20150204 path COLUMN_SCALAR Paths_20150204 | ||
table_create Times_20150204 TABLE_PAT_KEY Time | ||
column_create Times_20150204 timestamp_index COLUMN_INDEX Logs_20150204 timestamp | ||
|
||
table_create PathTerms_20150204 TABLE_PAT_KEY ShortText \ | ||
--default_tokenizer TokenBigram \ | ||
--normalizer NormalizerAuto | ||
column_create PathTerms_20150204 index COLUMN_INDEX|WITH_POSITION \ | ||
Paths_20150204 _key | ||
|
||
|
||
load --table Logs_20150203 | ||
[ | ||
{"timestamp": "2015-02-03 12:49:00", "path": "/tmp/log"}, | ||
{"timestamp": "2015-02-03 23:59:59", "path": "/var/"} | ||
] | ||
|
||
load --table Logs_20150204 | ||
[ | ||
{"timestamp": "2015-02-04 00:00:00", "path": "/tmp/log"}, | ||
{"timestamp": "2015-02-04 13:49:00", "path": "/root/"}, | ||
{"timestamp": "2015-02-04 13:50:00", "path": "/etc/aliases"} | ||
] | ||
|
||
#@disable-logging | ||
thread_limit 1 | ||
database_unmap | ||
#@enable-logging | ||
|
||
#@copy-path fixture/sharding/logical_table_remove/broken #{db_path}.0000110 | ||
|
||
logical_table_remove Logs timestamp \ | ||
--min "2015-02-04 00:00:00" \ | ||
--min_border "include" | ||
|
||
dump |
Oops, something went wrong.