You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Andrey Somov (JIRA)" <ji...@apache.org> on 2010/10/14 12:05:33 UTC

[jira] Created: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

BTree: modify_node() and complete_root() functions do not make a new btree record
---------------------------------------------------------------------------------

                 Key: COUCHDB-920
                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
             Project: CouchDB
          Issue Type: Improvement
          Components: Database Core
    Affects Versions: 1.0.1
            Reporter: Andrey Somov
            Priority: Minor


BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.

tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921038#action_12921038 ] 

Paul Joseph Davis commented on COUCHDB-920:
-------------------------------------------

Andrey,

That patch looks correct to me. At this point I'm not sure I'd commit it just to clean up that relatively minor point though. I've been meaning to find time to go through and clean up the btree code considerably but haven't gotten around to it. Being such a core section of code I'd rather make fewer large changes rather than many small changes. If for no other reason than it makes bisecting easier. :D

If a couple other committers sign off on it then I'd feel fine committing it. I did fix the typo you noted though.

Also, keep digging on that code as the more people that understand some of these core parts the better.

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929682#action_12929682 ] 

Paul Joseph Davis commented on COUCHDB-920:
-------------------------------------------

Cool. I'll just reiterate that I think if we're going to start refactoring couch_btree (which it definitely needs) we should go much further so that we fix some of the more gnarly bits while we're at it.

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt updated COUCHDB-920:
---------------------------------

    Skill Level: Committers Level (Medium to Hard)  (was: New Contributors Level (Easy))

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Andrey Somov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Somov updated COUCHDB-920:
---------------------------------

    Attachment: btree_issue920.patch

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Joseph Davis resolved COUCHDB-920.
---------------------------------------

    Resolution: Not A Problem

If we're going to change the btree code, it should be more major of a change. The amount of testing that the current code has undergone is not IMO worth upsetting unless we're serious about refactoring.

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929871#action_12929871 ] 

Adam Kocoloski commented on COUCHDB-920:
----------------------------------------

I hear ya, but I disagree about doing it all in one big bang.  Andrey's patch only makes the code more readable and is comprehensible without needing to grok the entire btree functionality in one go.

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Andrey Somov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921294#action_12921294 ] 

Andrey Somov commented on COUCHDB-920:
--------------------------------------

Since the only value of the patch is to increase code readability it can certainly wait. (or even be dropped)
I have definitely spent more brain cycles trying to understand the redundant code. But the clean up may change the situation considerably.

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (COUCHDB-920) BTree: modify_node() and complete_root() functions do not make a new btree record

Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adam Kocoloski reopened COUCHDB-920:
------------------------------------


I think it's a worthwhile thing to apply.  I'd like to keep it open.

> BTree: modify_node() and complete_root() functions do not make a new btree record
> ---------------------------------------------------------------------------------
>
>                 Key: COUCHDB-920
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-920
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    Affects Versions: 1.0.1
>            Reporter: Andrey Somov
>            Priority: Minor
>         Attachments: btree_issue920.patch
>
>
> BTree: modify_node() and complete_root() functions do not make a new btree record. But nevertheless they return a btree as if it is different. The patch simplifies the code and makes it clear that only query_modify() function makes a new btree record.
> tests are OK.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.