_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
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
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
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
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
.
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
?
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
.
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
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
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
!
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
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
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
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
.
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
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
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
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
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
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
?
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
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
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
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
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
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
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
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
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
+);
+
+const loginSection = isLoginVisibleInsteadOfLogout ?
+ :
+ ;
+
+return (
+
+
+
+
Review comment:
no worries. I renamed it to `faux-navbar__linkcontainer`
This is an automated message from t
-
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
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.
---
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.
---
-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
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
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
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
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
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,
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
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
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(
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
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) ->
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
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
)
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
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
://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
% 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} =
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} ->
+
.
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
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
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
_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
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
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
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
)`?
--------
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
-
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
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.
--------
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(),
{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
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
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(),
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_
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
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
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
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
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
, 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
?
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
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} -&
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
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.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
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
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
.
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
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}
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).
+
+
+
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
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
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
201 - 300 of 5995 matches
Mail list logo