-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more usage tracking and core functionality
- Loading branch information
1 parent
e5e4820
commit ecda8f3
Showing
6 changed files
with
158 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -262,6 +262,7 @@ set_purge_infos_limit(DbName, Limit, Options) -> | |||
with_db(DbName, Options, {couch_db, set_purge_infos_limit, [Limit]}). | ||||
|
||||
open_doc(DbName, DocId, Options) -> | ||||
io:format("frpc:open_doc(~p, ~p, ~p)~n", [DbName, DocId, Options]), | ||||
with_db(DbName, Options, {couch_db, open_doc, [DocId, Options]}). | ||||
|
||||
open_revs(DbName, IdRevsOpts, Options) -> | ||||
|
@@ -352,6 +353,14 @@ get_uuid(DbName) -> | |||
|
||||
with_db(DbName, Options, {M, F, A}) -> | ||||
set_io_priority(DbName, Options), | ||||
couch_stats_resource_tracker:set_context_dbname(DbName), | ||||
%% TODO: better approach here than using proplists? | ||||
This comment has been minimized.
Sorry, something went wrong.
iilyak
Contributor
|
Options = [{user_ctx, Req#httpd.user_ctx} | Options0], |
It is very unfortunate that we don't have a mandatory request_context argument for all fabric.erl functions. The life would be so easier in this case. Instead we are mixing in request context data into database options and also injecting ADMIN_CTX over the place.
The above runt has nothing to do with you code. The best we can do is to create a helper fun in fabric_util.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Did you consider ets:fun2ms here?