Return-Path: X-Original-To: apmail-couchdb-commits-archive@www.apache.org Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 755B318DDB for ; Thu, 1 Oct 2015 10:17:04 +0000 (UTC) Received: (qmail 65936 invoked by uid 500); 1 Oct 2015 10:17:04 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 65810 invoked by uid 500); 1 Oct 2015 10:17:04 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 65794 invoked by uid 99); 1 Oct 2015 10:17:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Oct 2015 10:17:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 081A8E054B; Thu, 1 Oct 2015 10:17:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rnewson@apache.org To: commits@couchdb.apache.org Date: Thu, 01 Oct 2015 10:17:03 -0000 Message-Id: <13987f0c06b7489bb0b36171257a1b4d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] couch commit: updated refs/heads/master to d405523 Repository: couchdb-couch Updated Branches: refs/heads/master 2594c7f12 -> d405523c3 Inherit io_priority from the process creating the stream COUCHDB-2828 BugzID: 25815 Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/e1d1eeb1 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/e1d1eeb1 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/e1d1eeb1 Branch: refs/heads/master Commit: e1d1eeb14dd9a244c98c9610a94debb8b522369f Parents: 9afa6a0 Author: Levi McAuley Authored: Mon Sep 28 15:20:18 2015 -0700 Committer: Levi McAuley Committed: Wed Sep 30 11:26:49 2015 -0700 ---------------------------------------------------------------------- src/couch_stream.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/e1d1eeb1/src/couch_stream.erl ---------------------------------------------------------------------- diff --git a/src/couch_stream.erl b/src/couch_stream.erl index 1b51883..913977f 100644 --- a/src/couch_stream.erl +++ b/src/couch_stream.erl @@ -51,7 +51,7 @@ open(Fd) -> open(Fd, []). open(Fd, Options) -> - gen_server:start_link(couch_stream, {Fd, self(), Options}, []). + gen_server:start_link(couch_stream, {Fd, self(), erlang:get(io_priority), Options}, []). close(Pid) -> gen_server:call(Pid, close, infinity). @@ -198,7 +198,8 @@ write(Pid, Bin) -> gen_server:call(Pid, {write, Bin}, infinity). -init({Fd, OpenerPid, Options}) -> +init({Fd, OpenerPid, OpenerPriority, Options}) -> + erlang:put(io_priority, OpenerPriority), {EncodingFun, EndEncodingFun} = case couch_util:get_value(encoding, Options, identity) of identity ->