[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
timize_job_for_rate_limiting(Job0), +case couch_replicator_scheduler_sup:start_child(Job#job.rep) of +{ok, Child} -> +Ref = monitor(process, Child), +ok = update_state_started(Job, Child, Ref, State), +couch_log:notice("~p: Job ~p started as ~p", +

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
bs, total], TotalJobs), +update_running_jobs_stats(), +ok; +{error, not_found} -> +ok +end. + + +start_job_int(#job{pid = Pid}, _State) when Pid /= undefined -> +ok; + +start_job_int(#job{} = Job0, State) -> +Job = maybe_optim

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
ed this in the style nits: Just Say No to Lines Longer Than 80 Characters! -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
State) -> +now_diff_sec(TS) > interval(State). Review comment: Given that this is in seconds should we go with `>=`? Or not? I can't convince myself either way if equal to period is correct or not or harmless that its interval+1 in reality. This is an autom

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
hough with my last comment, given that we use `/` instead of `div` it probably doesn't make a difference since it'll be interval+1usec rather than interval+1sec. ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
Period of Review comment: Another bug I spotted and forgot about, I'm pretty sure Period and Period0 are backwards here. Also, I really think we should probably rename the name bindings because obviously either me or the code is wrong and its hard to know which (though I'm pretty sure

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
+{Mega, Sec, Micro} = os:timestamp(), +((Mega * 100) + Sec) * 1000 + round(Micro / 1000). Review comment: Div will work. Good idea! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
time to write a tool or find one that works for us to use so that we can just have accepted truth for style rather than a doc hidden somewhere on a wiki. This is an automated message from the Apache Git Service. To respond to the

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
link_clustr_event_listener(Mod, Fun, Args) -> ...` Which would then end up invoking something like `erlang:apply(Mod, Fun, Args ++ [Event])` -------- This is an automated message from the Apache Git Service. To respond to the message

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
uot;selector">>, V} | R]) -> +[{selector, V} | convert_options(R)]; +convert_options([{<<"worker_processes">>, V} | R]) -> +[{worker_processes, couch_util:to_integer(V)} | convert_options(R)]; +convert_options([{<<"worker_batch_size">>, V} | R]) -> +[{worker_batch_size, couch_util:to_integer(V)} | convert_options(R)]; +convert_options([{<<"http_connections">>, V} | R]) -> +[{http_connections, couch_util:to_integer(V)} | convert_options(R)]; +convert_options([{<<"connection_timeout">>, V} | R]) -> +[{connection_timeout, couch_util:to_integer(V)} | convert_options(R)]; +convert_options([{<<"retries_per_request">>, V} | R]) -> +[{retries, couch_util:to_integer(V)} | convert_options(R)]; +convert_options([{<<"socket_options">>, V} | R]) -> +{ok, SocketOptions} = couch_util:parse_term(V), +[{socket_options, SocketOptions} | convert_options(R)]; +convert_options([{<<"since_seq">>, V} | R]) -> +[{since_seq, V} | convert_options(R)]; +convert_options([{<<"use_checkpoints">>, V} | R]) -> +[{use_checkpoints, V} | convert_options(R)]; +convert_options([{<<"checkpoint_interval">>, V} | R]) -> +[{checkpoint_interval, couch_util:to_integer(V)} | convert_options(R)]; +convert_options([_ | R]) -> % skip unknown option +convert_options(R). + +-spec check_options([_]) -> [_]. +check_options(Options) -> +DocIds = lists:keyfind(doc_ids, 1, Options), +Filter = lists:keyfind(filter, 1, Options), +Selector = lists:keyfind(selector, 1, Options), +case {DocIds, Filter, Selector} of +{false, false, false} -> Options; +{false, false, _} -> Options; +{false, _, false} -> Options; +{_, false, false} -> Options; +_ -> +throw({bad_request, "`doc_ids`, `filter`, `selector` are mutually exclusive options"}) +end. + +-spec parse_proxy_params(binary() | [_]) -> [_]. +parse_proxy_params(ProxyUrl) when is_binary(ProxyUrl) -> +parse_proxy_params(?b2l(ProxyUrl)); +parse_proxy_params([]) -> +[]; +parse_proxy_params(ProxyUrl) -> +#url{ +host = Host, +port = Port, +username = User, +password = Passwd, +protocol = Protocol +} = ibrowse_lib:parse_url(ProxyUrl), +[{proxy_protocol, Protocol}, {proxy_host, Host}, {proxy_port, Port}] ++ +case is_list(User) andalso is_list(Passwd) of Review comment: This is an odd pattern. On the one hand it makes the ++ on the previous line more obvious. On the other its a made up style. You might want to consider something like: ```erlang [ {proxy_protocol, Protocol}, {proxy_host, Host}, {proxy_port, Port} ] ++ case is_list(User) andalso is_list(Passwd) of ... ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
ll on one line 2. all args and closing paren and comma on new line indented twice more 3. each arg on a separate line, indented twice, closing parent/comma on separate line indented once The idea here being that we want to communicate the sections and make things easier on eyeballs.

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
_MAP_FUN}, +{<<"reduce">>, <<"_count">>} +]}, +DocProps = [ +{<<"_id">>, DDocId}, + {<<"language">>, <<"javascript">>}, +{<<&quo

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
n({change, {Change}, _}, _) -> +DbName = couch_util:get_value(<<"id">>, Change), + case DbName of <<"_design/", _/binary>> -> ok; _Else -> +case couch_replicator_utils:is_deleted(Change) of +true -> Review comment: Case statement patterns should be in one indent. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
Though I guess the gen_server links to everything and monitors clients so theoretically there's no hole in the dance here. ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHu

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
n(), #state{}) -> non_neg_integer(). +stop_jobs(Count, IsContinuous, State) -> +Running0 = running_jobs(), +ContinuousPred = fun(Job) -> is_continuous(Job) =:= IsContinuous end, +Running1 = lists:filter(ContinuousPred, Running0), +Running2 = lists:sort(fun oldest_job_first/2, Runni

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
defined, undefined, <<>>, undefined,false,undefined,0,undefined} ``` While it was making a request it had adm:pass in there This is an automated message from the Apache Git Ser

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
user/pass pair out of the record to be clear that we're not passing credentials to the worker. -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the s

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
------ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on issue #470: Scheduling Replicator

2017-04-07 Thread git
, and then style issues. Commencing in 3, 2, 1, now! This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
ot have authentication cached and then make sure we provide it for each request individually. And we should also assert that ibrowse isn't caching credentials between requests as well. -------- This is an automated message from the Apache Gi

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
------ This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
e view on disk. Dashboard code will have to be modified as well perhaps. -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries abou

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
, Review comment: Did we add this or was it just always missing? Adding _ fields to docs will lead to oddness with the replicator when replicating to versions of couch that don't allow this field. ---- This is an automated messa

[GitHub] wohali closed pull request #361: COUCHDB-769: Store attachments in the external storage

2017-04-08 Thread git
wohali closed pull request #361: COUCHDB-769: Store attachments in the external storage URL: https://github.com/apache/couchdb/pull/361 This is an automated message from the Apache Git Service. To respond to the message

[GitHub] wohali commented on issue #361: COUCHDB-769: Store attachments in the external storage

2017-04-08 Thread git
-submit -- please do! Thanks for your contribution to CouchDB. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
gt; Period of +true -> +% Normal operation +Period; +false -> +% During startup +Period0 +end. + + +-spec is_stable(#state{}) -> boolean(). +is_stable(#state{last_change = TS} = State) -> +now_diff_sec(TS) > in

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
o ibrowse or the rest of the connection pool when we create and acquire workers. -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, ple

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
eriod of Review comment: Ohh. Yeah, that makes sense finally. We should add a comment then cause that's super not obvious to me at least. Something simple like: % For the first Period seconds after node boot we check cluster stability every % StartPeriod seconds. Once the

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-07 Thread git
= From, +case ibrowse_lib:parse_url(URL) of +#url{host=Host, port=Port} -> Review comment: Done. Pushed https://github.com/apache/couchdb/pull/470/commits/4b8551597e041f520308c85402da13c262bca64a -------- This is an

[GitHub] flimzy opened a new pull request #124: Document filtered replication

2017-04-07 Thread git
flimzy opened a new pull request #124: Document filtered replication URL: https://github.com/apache/couchdb-documentation/pull/124 This is an automated message from the Apache Git Service. To respond to the message, please

[GitHub] nickva opened a new pull request #479: Couchdb 3376 fix mem3 shards fixes

2017-04-17 Thread git
This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-17 Thread git
t. However, the Javascript integration tests that's the problem, it takes too long and times out. So had to add an option to dev/run to override config values from command line. This is an automated message from the Apache Git Service.

[GitHub] nickva commented on issue #476: Couchdb 3376 fix mem3 shards

2017-04-17 Thread git
s (probably foolishly) using`gen_server:multi_call(mem3_shards, shard_db_changed).` to clear the cache. After a while noticed dead writers in ?OPENERS which table was preventing new writers from being created.

[GitHub] nickva commented on a change in pull request #476: Couchdb 3376 fix mem3 shards

2017-04-17 Thread git
insert, DbName, Writer, UpdateSeq}, St) -> +NewSt = case UpdateSeq < St#st.update_seq of Review comment: Do we want `=<` here? instead of `<` ? This is an automated message from the Apache Git Service. To respond to t

[GitHub] nickva commented on issue #476: Couchdb 3376 fix mem3 shards

2017-04-17 Thread git
bably foolishly) using`gen_server:multi_call(mem3_shards, shard_db_changed).` to clear the cache. After a while noticed dead writers in ?OPENERS which table was preventing new writers from being created.

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-17 Thread git
-> ``` But in general most other behavior is the same This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific com

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
ut then we have the jobs key which is different than rows. That seems... odd. ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific co

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
gen_event` event server set up in the `couch_replication_event` child Review comment: the `gen_event` server named `couch_replicator_event` as previously covered. This is an automated message from the Apache Git Service. To respond to the message

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
es, _BadNodes} = gen_server:multi_call(couch_task_status, all), ``` ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
t_param(Req, "skip", 0, 0, infinity), +{Replies, _BadNodes} = rpc:multicall(couch_replicator_scheduler, jobs, []), Review comment: We should probably include something about BadNodes in the response. ---- This is

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
eplicator_clustering` is using. Review comment: "is using" -> "uses it". ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL abo

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
ccumulator for a function in a different module. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
ction across replication tasks. Main interface Review comment: "The main interface" This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to g

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
h_replicator_db_chanages` gets a `{cluster, stable}` event, it will +restart `couch_multidb_changes` process it controls which will launch an Review comment: "restart the `couch_multidb_changes`" I think? This is an autom

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
s is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
It follows the same pattern as all_docs_view from chttpd_db ``` VAcc = #vacc{db=Db, req=Req, threshold=Max}, {ok, Resp} = fabric:all_docs(Db, Options, fun couch_mrview_http:view_cb/2, VAcc, Args3), {ok, Resp#vacc.resp}. ``` --

[GitHub] iilyak commented on a change in pull request #471: Use efficient set storage for field names

2017-04-14 Thread git
v2}] 19> Set = lists:foldl( 19> fun({Name, _, _}, Set) -> 19> gb_sets:add([<<"$fieldnames">>, Name, []], Set) 19> end, gb_sets:new(), Fields), 19> gb_sets:to_list(Set). [[<<"$fieldnames">>,foo,[]]]

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
_replicator_httpd isn't Cloudant specific? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
". Fluctuating seems kind of vague. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this servi

[GitHub] davisp commented on a change in pull request #470: Scheduling Replicator

2017-04-14 Thread git
ew comment: "with left at the top and right on the bottom" maybe? Root doesn't seem like the correct word. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use

[GitHub] sagelywizard commented on a change in pull request #470: Scheduling Replicator

2017-04-17 Thread git
mented out? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.

[GitHub] sagelywizard commented on a change in pull request #470: Scheduling Replicator

2017-04-17 Thread git
duler crashed jobs">>} +]}. +{[couch_replicator, jobs, total], [ +{type, gauge}, +{desc, <<"total number of replicator scheduler jobs">>} +]}. +{[couch_replicator, connection, acquires], [ +{type, counter}, +{desc, <<"number of times connections

[GitHub] sagelywizard commented on a change in pull request #470: Scheduling Replicator

2017-04-17 Thread git
ring the the Review comment: `the the` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastruct

[GitHub] nickva commented on a change in pull request #476: Couchdb 3376 fix mem3 shards

2017-04-17 Thread git
insert, DbName, Writer, UpdateSeq}, St) -> +NewSt = case UpdateSeq < St#st.update_seq of Review comment: Do we want `=<` here? instead of `<` ? This is an automated message from the Apache Git Service. To respond to t

[GitHub] sagelywizard commented on a change in pull request #470: Scheduling Replicator

2017-04-17 Thread git
: Typo: `applicatin` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact

[GitHub] nickva commented on issue #478: Clarify & correct require_valid_user setting

2017-04-18 Thread git
nickva commented on issue #478: Clarify & correct require_valid_user setting URL: https://github.com/apache/couchdb/pull/478#issuecomment-294860357 +1 This is an automated message from the Apache Git Service. To res

[GitHub] sagelywizard commented on a change in pull request #477: Add LRU for view groups

2017-04-18 Thread git
and/or stop iterating over the LRU. This change just explicitly pulled those two considerations apart. -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the speci

[GitHub] davisp commented on issue #480: Fix mango full text detection

2017-04-18 Thread git
requiring dreyfus in a specific place on the filesystem. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about

[GitHub] davisp closed pull request #482: Fix mem3_sync_event_listener unit test

2017-04-18 Thread git
davisp closed pull request #482: Fix mem3_sync_event_listener unit test URL: https://github.com/apache/couchdb/pull/482 This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] nickva commented on issue #480: Fix mango full text detection

2017-04-18 Thread git
,176,239,182,81,16,121,233,213,38,200,90, 22,150,86>>}] ``` with Dreyfus dep: ``` diff --git a/rebar.config.script b/rebar.config.script index 201cc0c0e..a1e516dc8 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -57,6 +57,8 @@ Dep

[GitHub] nickva commented on issue #480: Fix mango full text detection

2017-04-18 Thread git
nickva commented on issue #480: Fix mango full text detection URL: https://github.com/apache/couchdb/pull/480#issuecomment-294981476 +1 This is an automated message from the Apache Git Service. To respond to the message

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
couch_replicator_docs:update_triggered(Rep, RepId); +false -> +ok +end. + + +-spec error_backoff(non_neg_integer()) -> seconds(). +error_backoff(ErrCnt) -> +Exp = min(ErrCnt, ?ERROR_MAX_BACKOFF_EXPONENT), +% ErrCnt is the exponent here. The reason 6

[GitHub] jaydoane commented on issue #476: Couchdb 3376 fix mem3 shards

2017-04-18 Thread git
sts passed. ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.

[GitHub] davisp commented on issue #481: Fix couch_auth_cache reinitialization logic

2017-04-18 Thread git
. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp closed pull request #481: Fix couch_auth_cache reinitialization logic

2017-04-18 Thread git
davisp closed pull request #481: Fix couch_auth_cache reinitialization logic URL: https://github.com/apache/couchdb/pull/481 This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
cator"}, {vsn, git}, {mod, {couch_replicator_app, []}}, -{modules, [ -couch_replicator, -couch_replicator_api_wrap, -couch_replicator_app, -couch_replicator_httpc, -couch_replicator_httpd, -couch_replicat

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
r, not_found}. +doc(Db, DocId) -> +HealthThreshold = couch_replicator_scheduler:health_threshold(), +Res = (catch ets:foldl(fun(RDoc, nil) -> +{Shard, RDocId} = RDoc#rdoc.id, +case {mem3:dbname(Shard), RDocId} of +{Db, DocId} -> +throw({found,

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
ejson_doc(RDoc, HealthThreshold)}); +{_OtherDb, _OtherDocId} -> +nil +end +end, nil, ?MODULE)), +case Res of +{found, DocInfo} -> +{ok, DocInfo}; +nil -> +{error, not_found} +end. + + +-spec doc_looku

[GitHub] flimzy opened a new pull request #128: Update description and examples for _replication_state_time

2017-04-18 Thread git
flimzy opened a new pull request #128: Update description and examples for _replication_state_time URL: https://github.com/apache/couchdb-documentation/pull/128 This is an automated message from the Apache Git Service

[GitHub] mayya-sharipova commented on issue #476: Couchdb 3376 fix mem3 shards

2017-04-18 Thread git
the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
cator"}, {vsn, git}, {mod, {couch_replicator_app, []}}, -{modules, [ -couch_replicator, -couch_replicator_api_wrap, -couch_replicator_app, -couch_replicator_httpc, -couch_replicator_httpd, -couch_replicat

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
cator"}, {vsn, git}, {mod, {couch_replicator_app, []}}, -{modules, [ -couch_replicator, -couch_replicator_api_wrap, -couch_replicator_app, -couch_replicator_httpc, -couch_replicator_httpd, -couch_replicat

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
n, State, _Extra) -> +{ok, State}. + + +% Doc processor gen_server private helper functions + +% Handle doc update -- add to ets, then start a worker to try to turn it into +% a replication job. In most cases it will succeed quickly but for filtered +% replicationss or if there are duplicates, it could take longer Review comment: typo This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
value scaled by the number of replications. If the are a lot of +% them wait is longer, but not more than a day (?TS_DAY_SEC). If there +% are just few, wait is shorter, starting at about 30 seconds. `2 *` is +% used since the expected wait would then be 0.5 * Range so it is easier +% to see t

[GitHub] davisp closed pull request #480: Fix mango full text detection

2017-04-18 Thread git
davisp closed pull request #480: Fix mango full text detection URL: https://github.com/apache/couchdb/pull/480 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub

[GitHub] sagelywizard commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
_after(Interval, close_idle_connections), Review comment: Just to echo Ilya's comment above, this should be `erlang:send_after` too. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to th

[GitHub] sagelywizard commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
{", string:join(Parts, ","), "\r\n"], +{ok, AccOut} = maybe_flush_response(Acc, Chunk, iolist_size(Chunk)), +{ok, AccOut#vacc{prepend="", meta_sent=true}}; + + +docs_cb({meta, _Meta}, #vacc{}=Acc) -> +%% ignore metadata +{ok, Acc}; + +docs_cb({row, Row},

[GitHub] flimzy commented on issue #124: Document filtered replication

2017-04-18 Thread git
. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
t/lib/stdlib/src/gen_server.erl#L840) report when process die. ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this ser

[GitHub] tonysun83 commented on a change in pull request #477: Add LRU for view groups

2017-04-18 Thread git
re? -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] davisp commented on issue #480: Fix mango full text detection

2017-04-18 Thread git
since people may want to be able to pull dreyfus in without having ot modify couchdb in a build chain. I managed to find a much cleaner check for dreyfus so updating that as well. This is an automated message from the Apache Git

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
value scaled by the number of replications. If the are a lot of +% them wait is longer, but not more than a day (?TS_DAY_SEC). If there +% are just few, wait is shorter, starting at about 30 seconds. `2 *` is +% used since the expected wait would then be 0.5 * Range so it is easier +% to

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
ue scaled by the number of replications. If the are a lot of +% them wait is longer, but not more than a day (?TS_DAY_SEC). If there +% are just few, wait is shorter, starting at about 30 seconds. `2 *` is +% used since the expected wait would then be 0.5 * Range so it is easier +% to

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
e. 1. Convert to set 2. Do sets:subtract to determine list of unknown fields 3. If all fields are valid do list_to_existing_atom(S) -------- This is an automated message from the Apache Git Service. To respond to the message, pleas

[GitHub] davisp opened a new pull request #482: Fix mem3_sync_event_listener unit test

2017-04-18 Thread git
the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] nickva commented on issue #482: Fix mem3_sync_event_listener unit test

2017-04-18 Thread git
nickva commented on issue #482: Fix mem3_sync_event_listener unit test URL: https://github.com/apache/couchdb/pull/482#issuecomment-294949056 +1 This is an automated message from the Apache Git Service. To respond

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
's still worth it because in case of a crash it won't show up in last message. ---- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment.

[GitHub] tonysun83 commented on a change in pull request #477: Add LRU for view groups

2017-04-18 Thread git
re? -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] tonysun83 commented on a change in pull request #477: Add LRU for view groups

2017-04-18 Thread git
re? -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] sagelywizard commented on a change in pull request #477: Add LRU for view groups

2017-04-18 Thread git
= ets:delete(Dbs, DbName), -close_int(ets:next(Updates, Key), Updates, Dbs) +ok +end, +case Stop of +false -> close_int(ets:next(Updates, Key), Lru); Review comment: That case is handled above on line 58. ---------

[GitHub] tonysun83 commented on a change in pull request #477: Add LRU for view groups

2017-04-18 Thread git
lete(Dbs, DbName), -close_int(ets:next(Updates, Key), Updates, Dbs) +ok +end, +case Stop of +false -> close_int(ets:next(Updates, Key), Lru); Review comment: wups, I missed it on 58, yup i see it now ---------

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
, size), +% This value scaled by the number of replications. If the are a lot of +% them wait is longer, but not more than a day (?TS_DAY_SEC). If there +% are just few, wait is shorter, starting at about 30 seconds. `2 *` is +% used since the expected wait would then be 0.5 * Range so it is easier +% to see th

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
, size), +% This value scaled by the number of replications. If the are a lot of +% them wait is longer, but not more than a day (?TS_DAY_SEC). If there +% are just few, wait is shorter, starting at about 30 seconds. `2 *` is +% used since the expected wait would then be 0.5 * Range so it is easier +% to see th

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
f an error. `throw({not_found, JobId})` or `throw({error, {unknown_job, JobId}})`. Feel free to ignore. -------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services

[GitHub] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
-> +UserCtx = Req#httpd.user_ctx, +case couch_replicator:doc(?REPDB, DocId, UserCtx#user_ctx.roles) of +{ok, DocInfo} -> +send_json(Req, couch_replicator_httpd_util:update_db_name(DocInfo)); +{error, not_found} -> + throw(not_found) Review

[GitHub] garrensmith opened a new pull request #899: remove deprecated isMounted api

2017-04-18 Thread git
garrensmith opened a new pull request #899: remove deprecated isMounted api URL: https://github.com/apache/couchdb-fauxton/pull/899 This is an automated message from the Apache Git Service. To respond to the message, please

[GitHub] nickva commented on a change in pull request #470: Scheduling Replicator

2017-04-18 Thread git
r, not_found}. +doc(Db, DocId) -> +HealthThreshold = couch_replicator_scheduler:health_threshold(), +Res = (catch ets:foldl(fun(RDoc, nil) -> +{Shard, RDocId} = RDoc#rdoc.id, +case {mem3:dbname(Shard), RDocId} of +{Db, DocId} -> +throw({f

<    1   2   3   4   5   6   7   8   9   10   >