commit | db52f10059d46e736898a8de45ebc689b7ea4254 | [log] [tgz] |
---|---|---|
author | Benjamin Bastian <benjamin.bastian@gmail.com> | Wed Feb 19 13:41:28 2014 -0800 |
committer | Robert Newson <rnewson@apache.org> | Thu Aug 07 17:00:36 2014 +0100 |
tree | 4eec6e9bcb061ab08423bf0e8b3d6b5dad9deb1a | |
parent | c0f03829df9444c72e3b5c73143d2ada3f3ca0e2 [diff] |
Use gen_server:cast rather than rexi RPCs Prior to this commit, the global_changes_listener would send updates to the global_changes_server via a rexi RPC which only did a gen_server:call. This is needlessly heavyweight and would cause gen_server:call timeout errors when the global_changes_server was slow (usually due to slow disk IO). This commit removes the rexi RPC and replaces it with a gen_server:cast. Since this causes all global_changes_server handlers to not reply, this commit also removes the format_reply function as it's unnecessary. BugzID: 28242
This app supplies the functionality for the /_db_updates
endpoint.
When a database is created, deleted, or updated, a corresponding event will be persisted to disk (Note: This was designed without the guarantee that a DB event will be persisted or ever occur in the _db_updates
feed. It probably will, but it isn't guaranteed). Users can subscribe to a _changes
-like feed of these database events by querying the _db_updates
endpoint.
When an admin user queries the /_db_updates
endpoint, they will see the account name associated with the DB update as well as update
1: global_changes
, db_writes
: The number of doc updates caused by global_changes.
2: global_changes
, server_pending_updates
: The number of documents aggregated into the pending write batch.
3: global_changes
, listener_pending_updates
: The number of documents aggregated into the pending event batch.
4: global_changes
, event_doc_conflict
: The number of rev tree branches in event docs encountered by global_changes. Should never happen.
5: global_changes
, rpcs
: The number of non-fabric RPCs caused by global_changes.
1: global_changes
, max_event_delay
: (integer, milliseconds) The total timed added before an event is forwarded to the writer.
2: global_changes
, max_write_delay
: (integer, milliseconds) The time added before an event is sent to disk.
3: global_changes
, update_db
: (true/false) A flag setting whether to update the global_changes database. If false, changes will be lost and there will be no performance impact of global_changes on the cluster.