-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify start/end timestamp in riak-cs-admin gc command #1147
Conversation
Several options (--start, --end, --leeway, --max_workers) are added to `riak-cs-admin gc batch` command for deterministic GC batch execution. ISO8601 type timestamp are supported at start/end option. Leeway periods are still just by seconds. Also, number of concurrency can be specified at each batch execution. Although they are still optional, old `riak-cs-admin batch <leeway>` style is also supported.
b3849ef
to
356e115
Compare
Added riak_test, removed [wip] tag and ready for review. This time it's working. After this get merged, block leak demo code will be another pull request with some updates. |
9a49497
to
5e51958
Compare
@@ -1191,3 +1191,18 @@ get_cmd_result(Port, WaitTime) -> | |||
after WaitTime -> | |||
{error, timeout} | |||
end. | |||
|
|||
%% Copy from rts:iso8601/1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No indent needed here.
Maybe a bug in the existing code, negative leeway can be specified.
In getopt mode, it is propery rejected.
|
end, Options). | ||
|
||
-spec datetime(string()) -> non_neg_integer(). | ||
datetime(S) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function returns epoch, not datetime.
* change max_workers to max-workers as option name * change gc_tests to use proper timeslices * fix eunit * strip some unused code
fb3e1ce
to
a631be2
Compare
I believe I've covered all your comments 🍣 |
232b103
to
9e822ee
Compare
Negative leeway (commented at #1147 (comment) ) is still accepted. |
lager:debug("Keys: ~p", [Keys]), | ||
StartKey = list_to_binary(integer_to_list(Start0)), | ||
EndKey = list_to_binary(integer_to_list(End0)), | ||
EndKeyHPF = fun(Key) when EndKey < Key -> true; (_Key) -> false end, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be a little simpler, fun(Key) -> EndKey < Key end
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're a genius!
4fad2f0
to
8fe19ac
Compare
d810fe7
to
e2995ee
Compare
e2995ee
to
ffa5467
Compare
%% {StartKey, _} = hd(SortedKeys), | ||
%% {EndKey, _} = lists:last(SortedKeys), | ||
BatchStart = riak_cs_gc:timestamp(), | ||
%% ?debugVal({StartKey, EndKey, BatchStart}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These four comments seems unnecessary?
eunit passed and all r_t succeeded both for basic and mb 🐉 |
Specify start/end timestamp in riak-cs-admin gc command Reviewed-by: shino
@borshop merge |
Release note: Add options to Details and usage is already written: https://github.com/basho/riak_cs/blob/develop/RELEASE-NOTES.md#new-riak-cs-admin-gc-command _[posted via JIRA by Kota Uenishi]_ |
Several options (--start, --end, --leeway, --max_workers) are added
to
riak-cs-admin gc batch
command for deterministic GC batchexecution. ISO8601 type timestamp are supported at start/end option.
Leeway periods are still just by seconds.
Also, number of concurrency can be specified at each batch execution.
Although they are still optional, old
riak-cs-admin batch <leeway>
style is also supported.