[GitHub] nickva commented on a change in pull request #123: Documention for the scheduling replicator

2017-04-06 Thread git
_id`` -field. This way you can identify which documents refer to the same replication - -you can for example define a view which maps replication IDs to document IDs. +Notice the state for this replication is ``failed``. Unlike +``crashing``, ``failed`` state is terminal. As long as both documents +are present repli

[GitHub] tonysun83 commented on a change in pull request #123: Documention for the scheduling replicator

2017-04-06 Thread git
o be + handled. + + * ``Running``: Replication job is running normally. This means, + there might be a change feed open, and if changes are noticed, they + would be processed and posted to the target. Job is still + considered ``Running`` even if its workers are currently not + strea

[GitHub] tonysun83 commented on a change in pull request #123: Documention for the scheduling replicator

2017-04-06 Thread git
Note that both document get exactly the same value for the ``_replication_id`` -field. This way you can identify which documents refer to the same replication - -you can for example define a view which maps replication IDs to document IDs. +Notice the state for this replication is ``failed``. Unlike +``crashing``, ``failed`` state is terminal. As long as both documents +are present replicator will not retry to run this replication. Another +reason for could be malformed documents. For example if worker process Review comment: reason for _crashes_ could be? 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 issue #123: Documention for the scheduling replicator

2017-04-06 Thread git
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 #123: Documention for the scheduling replicator

2017-04-06 Thread git
n state diagram + +Green and red shapes represent replication job states. + +Yellow shapes represent external APIs, that's how users interact with +the replicator. Writing documents to ``_replicator`` is the preferred +way of creating replications, but posting to the ``_replicate`` HTTP +endpoint is also supported. + +.. note:: Replications c

[GitHub] jaydoane opened a new pull request #474: 3364 fix view compactor unknown info

2017-04-06 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

[GitHub] wohali commented on issue #473: Reorganize snap files into ./snap/ directory

2017-04-06 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] jaydoane commented on issue #474: 3364 fix view compactor unknown info

2017-04-06 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

[GitHub] wohali commented on issue #122: Additions to _find and _index from original Mango docs PR

2017-04-06 Thread git
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] wohali commented on issue #340: Update Dockerfile

2017-04-05 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

[GitHub] nono commented on issue #340: Update Dockerfile

2017-04-05 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] millayr closed pull request #883: Navbar refactor

2017-04-05 Thread git
millayr closed pull request #883: Navbar refactor URL: https://github.com/apache/couchdb-fauxton/pull/883 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use

[GitHub] tonysun83 commented on issue #471: Use efficient set storage for field names

2017-04-05 Thread git
those fields won't be indexed. That's for a bigger PR. This is more of a cosmetic change, so we don't necessarily have to merge it. This is an automated message from the Apache Git Service. To respond to the message, please

[GitHub] wohali commented on issue #31: added Mango docs

2017-04-05 Thread git
the detail. Thanks for being tenacious on this one! 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] lornajane commented on issue #31: added Mango docs

2017-04-05 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] NorthNick commented on issue #138: Multipart/related handling improvements

2017-04-05 Thread git
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] wohali closed issue #1: Test issue

2017-04-05 Thread git
wohali closed issue #1: Test issue URL: https://github.com/apache/couchdb-pkg/issues/1 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

[GitHub] KimStebel closed pull request #31: added Mango docs

2017-04-05 Thread git
KimStebel closed pull request #31: added Mango docs URL: https://github.com/apache/couchdb-documentation/pull/31 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub

[GitHub] tonysun83 opened a new pull request #471: Use efficient set storage for field names

2017-04-05 Thread git
essage 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] garrensmith commented on issue #469: Choose index based on fields match

2017-04-05 Thread git
defaulted to the indices names. The only problem with that is there is a possibility of a doc being in one index but not in another and this could lead to unexpected results for a user. This is an automated message from the Apache Git

[GitHub] sagelywizard commented on issue #471: Use efficient set storage for field names

2017-04-05 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] garrensmith commented on issue #469: Choose index based on fields match

2017-04-05 Thread git
defaulted to the indices names. The only problem with that is there is a possibility of a doc being in one index but not in another and this could lead to unexpected results for a user. This is an automated message from the Apache Git

[GitHub] Humbedooh closed issue #472: Ponies are the best

2017-04-05 Thread git
Humbedooh closed issue #472: Ponies are the best URL: https://github.com/apache/couchdb/issues/472 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL

[GitHub] Humbedooh opened a new issue #472: Ponies are the best

2017-04-05 Thread git
Humbedooh opened a new issue #472: Ponies are the best URL: https://github.com/apache/couchdb/issues/472 Just saying... This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] Humbedooh opened a new issue #472: Ponies are the best

2017-04-05 Thread git
Humbedooh opened a new issue #472: Ponies are the best URL: https://github.com/apache/couchdb/issues/472 Just saying... This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] wohali closed issue #472: Ponies are the best

2017-04-05 Thread git
wohali closed issue #472: Ponies are the best URL: https://github.com/apache/couchdb/issues/472 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above

[GitHub] tonysun83 commented on issue #469: Choose index based on fields match

2017-04-06 Thread git
ll contain different docs. I'll think about it some more, but o you think that's more of index design on their part? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL a

[GitHub] tonysun83 commented on issue #469: Choose index based on fields match

2017-04-06 Thread git
l contain different docs. I'll think about it some more, but o you think that's more of index design on their part? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the

[GitHub] tonysun83 commented on issue #469: Choose index based on fields match

2017-04-06 Thread git
ll contain different docs. I'll think about it some more, but o you think that's more of index design on their part? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL a

[GitHub] millayr commented on a change in pull request #883: Navbar refactor

2017-04-05 Thread git
+); + +const loginSection = isLoginVisibleInsteadOfLogout ? + : + ; + +return ( + + + + Review comment: no worries. I renamed it to `faux-navbar__linkcontainer` This is an automated message from t

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

2017-04-09 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-09 Thread git
sweep through and close the idle connection. Now ibrowse clients actually have a close on idle timeout as well (I think 90 sec or so). If we I think this is a case of us not trusting that mechanism 100% and implementing our own cleanup. ---

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

2017-04-09 Thread git
sweep through and close the idle connection. Now ibrowse clients actually have a close on idle timeout as well (I think 90 sec or so). If we I think this is a case of us not trusting that mechanism 100% and implementing our own cleanup. ---

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

2017-04-09 Thread git
-only as a separate set of PRs and such. But it would be good to have an automated formatter-thing first. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL abov

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

2017-04-09 Thread git
ed then 61 sec is a safety net to brutally kill the worker so doesn't end up hung forever. 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-09 Thread git
ed then 61 sec is a safety net to brutally kill the worker so doesn't end up hung forever. 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] slang800 opened a new pull request #39: remove version and path export

2017-04-08 Thread git
available to anything requiring the module via `require.resolve`. Obviously, this will require a major version bump. Moved from https://github.com/dscape/nano/pull/294 This is an automated message from the Apache Git Service

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

2017-04-08 Thread git
here. If worker dies after unlinking we'll monitor its death and find 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 comme

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

2017-04-10 Thread git
t would be a generic module, in other words I didn't hard code suffix in there. o technically could monitor any suffix-ed set of local shards. This is an automated message from the Apache Git Service. To respond to the message,

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

2017-04-10 Thread git
the return value. Do you think it's more efficient to build the gb_set without the value rather than just converting the whole thing? ---- This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] rnewson closed pull request #895: Removing persistent scrollbars from navbar

2017-04-10 Thread git
rnewson closed pull request #895: Removing persistent scrollbars from navbar URL: https://github.com/apache/couchdb-fauxton/pull/895 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-12 Thread git
Type -> +[{type, Type}] +end, +{[{timestamp, couch_replicator_utils:iso8601(When)} | EventProps]} +end, Job#job.history), +{BaseID, Ext} = Job#job.id, +Pid = case Job#job.pid of +undefined -> +null; +P when is_pid(

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

2017-04-12 Thread git
gt; +ok = gen_server:cast(?MODULE, {set_max_churn, list_to_integer(V)}), +{ok, S}; + +handle_config_change("replicator", "interval", V, _, S) -> +ok = gen_server:cast(?MODULE, {set_interval, list_to_integer(V)}), +{ok, S}; + +handle_config_change("replic

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

2017-04-12 Thread git
son_json(Reason)}]; +Type -> +[{type, Type}] +end, +{[{timestamp, couch_replicator_utils:iso8601(When)} | EventProps]} +end, Job#job.history), +{BaseID, Ext} = Job#job.id, +Pid = case Job#job.pid of +undefined -> +null; +P when is_pid(P) ->

[GitHub] davisp opened a new pull request #476: Couchdb 3376 fix mem3 shards

2017-04-14 Thread git
oes clustered operations on a database but there's no existing test suite specifically for the caching behavior. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the UR

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

2017-04-14 Thread git
storage engine work so in the interest of thoroughness I'll duplicate my testing on master vs this PR and will post results of that data. This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] sagelywizard opened a new pull request #477: Add LRU for view groups

2017-04-14 Thread git
) with the correct commit hash once this PR get merged. 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] lornajane opened a new issue #126: Update published version of docs

2017-04-13 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] wohali commented on issue #126: Update published version of docs

2017-04-13 Thread git
://docs.couchdb.org/en/latest/contributing.html When we release 2.1.0 the instructions will update. 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

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

2017-04-13 Thread git
% accepts > 0 values and crashes otherwise. +Range = 1 + min(2 * (Total / 10), ?TS_DAY_SEC), +60 + random:uniform(round(Range)). + + +% Document removed from db -- clear ets table and remove all scheduled jobs +-spec removed_doc(db_doc_id()) -> ok. +removed_doc({DbName, DocId} =

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

2017-04-13 Thread git
start_jobs(StopCount, State); +true -> +ok +end. + + +-spec last_started(#job{}) -> erlang:timestamp(). +last_started(#job{} = Job) -> +case lists:keyfind(started, 1, Job#job.history) of +false -> +{0, 0, 0}; +{started, When} -> +

[GitHub] wohali commented on issue #43: Removing _rev

2017-04-13 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] wohali closed pull request #43: Removing _rev

2017-04-13 Thread git
wohali closed pull request #43: Removing _rev URL: https://github.com/apache/couchdb-documentation/pull/43 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use

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

2017-04-13 Thread git
already running as ~p. Most likely" +" because a duplicate replication is running on another node", +[?MODULE, Job#job.id, OtherPid]), +ok = update_state_crashed(Job, CrashMsg, State); +{error, Reason} -> +couch_log:notice("~p: Job ~p failed to start for reason ~p", +[?MODULE, Job, Reason]), +ok = update_state_crashed(Job, Reason, State) +end. + + +-spec stop_job_int(#job{}, #state{}) -> ok | {error, term()}. +stop_job_int(#job{pid = undefined}, _State) -> +ok; + +stop_job_int(#job{} = Job, State) -> +ok = couch_replicator_scheduler_sup:terminate_child(Job#job.pid), Review comment: Yes. We expect supervisor to work here otherwise a crash is acceptable. 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-13 Thread git
_churn", +?DEFAULT_MAX_CHURN), +MaxHistory = config:get_integer("replicator", "max_history", +?DEFAULT_MAX_HISTORY), +{ok, Timer} = timer:send_after(Interval, reschedule), Review comment: Good catch! This is an automated me

[GitHub] garrensmith closed pull request #898: New Navbar support for safari

2017-04-17 Thread git
garrensmith closed pull request #898: New Navbar support for safari URL: https://github.com/apache/couchdb-fauxton/pull/898 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 #476: Couchdb 3376 fix mem3 shards

2017-04-17 Thread git
t(?MODULE, {cache_insert, DbName, Shards}), +case maybe_spawn_shard_writer(DbName, Shards) of Review comment: Oh! I am stupid, it's a spawn not a spawn_link. Disregard This is an automated message from the Apache Git Service. T

[GitHub] millayr opened a new pull request #898: New Navbar support for safari

2017-04-17 Thread git
inside the flex container to completely remove the fixed positioning. 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] iilyak commented on a change in pull request #470: Scheduling Replicator

2017-04-20 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-20 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-20 Thread git
st(_, State) -> +{noreply, State}. + + +handle_info(cleanup, #state{timer = Timer}) -> +erlang:cancel_timer(Timer), +TableNames = couch_replicator_rate_limiter_tables:table_names(), Review comment: Ok. Will do. --------

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

2017-04-20 Thread git
re_rep_ddoc_exists(binary()) -> ok. +ensure_rep_ddoc_exists(RepDb) -> +case mem3:belongs(RepDb, ?REP_DESIGN_DOC) of +true -> +ensure_rep_ddoc_exists(RepDb, ?REP_DESIGN_DOC); +false -> +ok +end. + + +-spec ensure_rep_ddoc_exists(binary(),

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

2017-04-20 Thread git
{ok, Db}. + + +-spec ensure_rep_ddoc_exists(binary()) -> ok. +ensure_rep_ddoc_exists(RepDb) -> +case mem3:belongs(RepDb, ?REP_DESIGN_DOC) of +true -> +ensure_rep_ddoc_exists(RepDb, ?REP_DESIGN_DOC); +false -> +ok +end. + + +-spec ensure_rep_ddoc_exists(binary(), binary

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

2017-04-20 Thread git
DDoc = couch_doc:from_json_obj({DocProps}), +couch_log:notice("creating replicator ddoc", []), + {ok, _Rev} = save_rep_doc(RepDb, DDoc); +{ok, Doc} -> +Latest = replication_design_doc_props(DDocId), +{Props0} = couc

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

2017-04-20 Thread git
re_rep_ddoc_exists(binary()) -> ok. +ensure_rep_ddoc_exists(RepDb) -> +case mem3:belongs(RepDb, ?REP_DESIGN_DOC) of +true -> +ensure_rep_ddoc_exists(RepDb, ?REP_DESIGN_DOC); +false -> +ok +end. + + +-spec ensure_rep_ddoc_exists(binary(),

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

2017-04-19 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_

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

2017-04-19 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] tonysun83 commented on a change in pull request #476: Couchdb 3376 fix mem3 shards

2017-04-20 Thread git
shards? If that's the case, what's the purpose behind this? Before we were just monitoring it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above

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

2017-04-20 Thread git
shards? If that's the case, what's the purpose behind this? Before we were just monitoring it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above

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

2017-04-20 Thread git
cord with a replication_id. Calculating the id might involve +% fetching a filter from the source db, and so it could fail intermetently. +% In case of a failure to fetch the filter this function will throw a +% `{filter_fetch_error, Reason} exception. +update_rep_id(Rep) -> +RepId = couch_replicator_ids:replication_id(Rep), +Rep#rep{id = RepId}. + + +update_rep_doc(RepDbName, RepDocId, KVs) -> +update_rep_doc(RepDbName, RepDocId, KVs, 1). + + +update_rep_doc(RepDbName, RepDocId, KVs, Wait) when is_binary(RepDocId) -> +try +case open_rep_doc(RepDbName, RepDocId) of +{ok, LastRepDoc} -> +update_rep_doc(RepDbName, LastRepDoc, KVs, Wait * 2); +_ -> +ok +end +catch +throw:conflict -> +Msg = "Conflict when updating replication doc `~s`. Retrying.", +couch_log:error(Msg, [RepDocId]), +ok = timer:sleep(random:uniform(erlang:min(128, Wait)) * 100), +update_rep_doc(RepDbName, RepDocId, KVs, Wait * 2) Review comment: This breaks tail-recursiveness of the function. 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 issue #476: Couchdb 3376 fix mem3 shards

2017-04-20 Thread git
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-20 Thread git
, InfoP1} -> +{State0, {InfoP1}, 0, Time}; +false -> +{State0, {InfoP}, 0, null} +end +end; +failed -> + Info = get_value(<<"_replication_state_reason">>, Props, null), +{State0, Info, 1, StateTime}; +_OtherState -> +{null, null, 0, null} +end, +{[ +{doc_id, DocId}, +{database, RepDb}, +{id, null}, +{source, strip_url_creds(Source)}, +{target, strip_url_creds(Target)}, +{state, State1}, +{error_count, ErrorCount}, +{info, StateInfo}, +{start_time, StartTime}, +{last_updated, StateTime} + ]}. + + +state_atom(<<"triggered">>) -> +triggered; % This handles a legacy case were document wasn't converted yet +state_atom(State) when is_binary(State) -> +erlang:binary_to_existing_atom(State, utf8); +state_atom(State) when is_atom(State) -> +State. + + +-spec check_authorization(rep_id(), #user_ctx{}) -> ok | not_found. +check_authorization(RepId, #user_ctx{name = Name} = Ctx) -> +case couch_replicator_scheduler:rep_state(RepId) of +#rep{user_ctx = #user_ctx{name = Name}} -> +ok; +#rep{} -> +couch_httpd:verify_is_server_admin(Ctx); Review comment: To be more specific the reason to keep it is because it behaves like master currently: https://github.com/apache/couchdb/blob/master/src/couch_replicator/src/couch_replicator.erl#L214-L216 But as you pointed out it's not quite right, and it should be fixed. I made a separate ticket for it: https://issues.apache.org/jira/browse/COUCHDB-3386 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 #476: Couchdb 3376 fix mem3 shards

2017-04-20 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-20 Thread git
Rep#rep{id = RepId}. + + +update_rep_doc(RepDbName, RepDocId, KVs) -> +update_rep_doc(RepDbName, RepDocId, KVs, 1). + + +update_rep_doc(RepDbName, RepDocId, KVs, Wait) when is_binary(RepDocId) -> +try +case open_rep_doc(RepDbName, RepDocId) of +{ok, LastRepDoc} -&

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

2017-04-21 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 #476: Couchdb 3376 fix mem3 shards

2017-04-21 Thread git
state from the listener. 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 c

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

2017-04-21 Thread git
://github.com/apache/couchdb/commit/c0fda54d3ed4f06f1e41db598859de23aaf0e3ac 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] davisp commented on a change in pull request #476: Couchdb 3376 fix mem3 shards

2017-04-21 Thread git
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 #476: Couchdb 3376 fix mem3 shards

2017-04-21 Thread git
nothing would ever be inserted into the cache. 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 th

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

2017-04-21 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

[GitHub] gabrielmancini opened a new issue #903: error on start fauxton after npm install -g

2017-04-20 Thread git
elease/index.html ``` 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 Infrastr

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

2017-04-21 Thread git
andles 500) -------- 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] wohali commented on a change in pull request #483: New couchup 1.x -> 2.x database migration tool

2017-04-21 Thread git
Review comment: Yup, this is how I support python-requests 0.x. Will do. 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 que

[GitHub] wohali commented on a change in pull request #483: New couchup 1.x -> 2.x database migration tool

2017-04-21 Thread git
it's a trivial refactor. 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 W

[GitHub] wohali commented on a change in pull request #483: New couchup 1.x -> 2.x database migration tool

2017-04-21 Thread git
ault for the progress bar to be on, so the CLI flag needs to turn it off. ---- 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 commen

[GitHub] wohali commented on a change in pull request #483: New couchup 1.x -> 2.x database migration tool

2017-04-21 Thread git
meant "node-local" docs. Could just make this more generic with source/target rather than local_/clus_. 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] wohali commented on a change in pull request #483: New couchup 1.x -> 2.x database migration tool

2017-04-21 Thread git
lus_size = local_size +progbar.update(clus_size) +count = clus_count +time.sleep(1) Review comment: Disagree...this is only used for the --timeout=XX option, and needs to stay at 1s granularity otherwise the timeout needs to be forced to be a multiple of the pe

[GitHub] wohali commented on a change in pull request #483: New couchup 1.x -> 2.x database migration tool

2017-04-21 Thread git
Aborting.') +exit(1) Review comment: I did consider this, yeah. Initially I was raising unique Exceptions but switched over to this to make it easier for shell scripting. Going on memory I think the only function that has multiple exit()s is this one, so this might be the onl

[GitHub] cboden opened a new issue #41: Greedy URL parser

2017-04-21 Thread git
rue' } } ``` 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 #476: Couchdb 3376 fix mem3 shards

2017-04-21 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

[GitHub] wohali closed issue #126: Update published version of docs

2017-04-13 Thread git
wohali closed issue #126: Update published version of docs URL: https://github.com/apache/couchdb-documentation/issues/126 This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] wohali closed issue #111: Requesting a CONTRIBUTING.md document

2017-04-13 Thread git
wohali closed issue #111: Requesting a CONTRIBUTING.md document URL: https://github.com/apache/couchdb-documentation/issues/111 This is an automated message from the Apache Git Service. To respond to the message, please log

[GitHub] wohali commented on a change in pull request #2: Add snap packaging that was previously in the main repo

2017-04-13 Thread git
the Apache license header to this file, as in https://github.com/apache/couchdb/blob/master/src/couch/priv/spawnkillable/couchspawnkillable.sh#L3-L17 This is an automated message from the Apache Git Service. To respond to the message

[GitHub] wohali commented on issue #2: Add snap packaging that was previously in the main repo

2017-04-13 Thread git
and long descriptions with our other packages, but this is a good starting point. Please add the header I mentioned and I'll merge this straight away. 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-13 Thread git
y_acc()}; +(complete, query_acc()) -> {ok, query_acc()}. +handle_replicator_doc_query({row, Props}, {Db, Cb, UserAcc, States}) -> +DocId = get_value(id, Props), +DocStateBin = get_value(key, Props), +DocState = erlang:binary_to_existing_atom(DocStateBin, utf8), Review c

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

2017-04-13 Thread git
form only +% accepts > 0 values and crashes otherwise. +Range = 1 + min(2 * (Total / 10), ?TS_DAY_SEC), +60 + random:uniform(round(Range)). + + +% Document removed from db -- clear ets table and remove all scheduled jobs +-spec removed_doc(db_doc_id()) -> ok. +removed_doc({DbName, DocId}

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

2017-04-13 Thread git
stamp(). +latest_crash_timestamp([]) -> +{0, 0, 0}; % Used to avoid special-casing "no crash" when doing now_diff + +latest_crash_timestamp([{{crashed, _Reason}, When} | _]) -> +When; + +latest_crash_timestamp([_Event | Rest]) -> +latest_crash_timestamp(Rest). + + +

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

2017-04-13 Thread git
obs(StopCount, State); +true -> +ok +end. + + +-spec last_started(#job{}) -> erlang:timestamp(). +last_started(#job{} = Job) -> +case lists:keyfind(started, 1, Job#job.history) of +false -> + {0, 0, 0}; +{started, When} -> +When +end. + + +-spec update_history(#job{}, event_type(), erlang:timestamp(), #state{}) -> +#job{}. +update_history(Job, Type, When, State) -> +History0 = [{Type, When} | Job#job.history], +History1 = lists:sublist(History0, State#state.max_history), Review comment: This would remove very old events from the history. Which means that `started` time will be unavailable. Which also mean that `last_started` would return `{0, 0, 0}`. Would it be a problem for `stats_fold`? In my observation it shouldn't but wanted to double check. 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 #474: 3364 fix view compactor unknown info

2017-04-13 Thread git
with merging it as is. Since couchdb code base uses `gen_server:call` everywhere. 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 spec

[GitHub] wqj2101 opened a new issue #40: Destroying An Undefined Doc Removes the Whole Database

2017-04-13 Thread git
ire( 'nano' )( CouchDB ); const dbName = nano.db.use( 'dbName' ); dbName.destroy( undefined, undefined, ( err ) => { **//DB is destroyed at this point** } ); This is an automated message from the Apache Git Servic

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