You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by brkolla <gi...@git.apache.org> on 2017/02/22 21:15:41 UTC

[GitHub] couchdb-couch pull request #230: Add sys db callbacks only once per db open

GitHub user brkolla opened a pull request:

    https://github.com/apache/couchdb-couch/pull/230

    Add sys db callbacks only once per db open

    Currently we are adding the sys db callbacks for every request instead once
    while opening the db. This fix will ensure that we will only add the sys
    db calls backs once while opening the db.
    
    COUCHDB-3307

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloudant/couchdb-couch add_sysdb_callback_once_per_db

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-couch/pull/230.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #230
    
----
commit e046427283961be73e2077ac990f3f0428cb8d2d
Author: brkolla <bk...@cloudant.com>
Date:   2017-02-19T21:33:39Z

    Add sys db callbacks only once per db open
    
    Currently we are adding the sys db callbacks for every request instead once
    while opening the db. This fix will ensure that we will only add the sys
    db calls backs once while opening the db.
    
    COUCHDB-3307

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch pull request #230: Add sys db callbacks only once per db open

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-couch/pull/230


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #230: Add sys db callbacks only once per db open

Posted by brkolla <gi...@git.apache.org>.
Github user brkolla commented on the issue:

    https://github.com/apache/couchdb-couch/pull/230
  
    @nickva Good catch. Will use the _Options_ from **db** record and rerun the test.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #230: Add sys db callbacks only once per db open

Posted by davisp <gi...@git.apache.org>.
Github user davisp commented on the issue:

    https://github.com/apache/couchdb-couch/pull/230
  
    Looks good. I'd also go ahead and remove the update_lru call on line 85 as its superflous. If we just got a message back from couch_server that means it was just placed into the LRU so updating it again is a double/worthless update to the ordering.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #230: Add sys db callbacks only once per db open

Posted by brkolla <gi...@git.apache.org>.
Github user brkolla commented on the issue:

    https://github.com/apache/couchdb-couch/pull/230
  
    @davisp Made the change as per your suggestion. Please review and approve and merge once the CI checks pass. Not sure why the CI check is in pending state forever.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #230: Add sys db callbacks only once per db open

Posted by nickva <gi...@git.apache.org>.
Github user nickva commented on the issue:

    https://github.com/apache/couchdb-couch/pull/230
  
    It seems functionally there is a difference between the current code path and the new one:
    
    If we don't add callbacks in case db is found, we don't update `Options` to include `sys_db` marker, so then then when we call `update_lru` it won't be inserted it in the LRU. Did we mean to do that?  At least we should mention the side-effect in the commit.
    
    Maybe we want to grab Options from `[#db{fd=Fd, fd_monitor=Lock} = Db] when Lock =/= locked ->` line instead of Options0 then re-run benchmark. Wonder if we are seeing a performance improvement not just directly from `maybe_add_sys_db_callbacks` function not taking more time (it does 3 config reads), but from the side effect of not updating LRU on every open.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-couch issue #230: Add sys db callbacks only once per db open

Posted by brkolla <gi...@git.apache.org>.
Github user brkolla commented on the issue:

    https://github.com/apache/couchdb-couch/pull/230
  
    @davisp Looks like CI build failed because of some error in loading the deps from apache repos.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---