You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Kostis Sagonas (JIRA)" <ji...@apache.org> on 2009/11/17 16:59:39 UTC

[jira] Created: (COUCHDB-570) CouchDB code improvements

CouchDB code improvements
-------------------------

                 Key: COUCHDB-570
                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
             Project: CouchDB
          Issue Type: Question
            Reporter: Kostis Sagonas
            Priority: Minor


Finally I've found the time today to sign up to jira (username: kostis).

I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file?  Some other way?

Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.

Best,
Kostis

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


[jira] Commented: (COUCHDB-570) CouchDB code improvements

Posted by "Bob Dionne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778967#action_12778967 ] 

Bob Dionne commented on COUCHDB-570:
------------------------------------

Interesting, I'd like to read up on this tool also.

couch_btree:chunkify(Bt...)  has a variable, Bt, that is never used and can be discarded. How hard would it be for tidier to detect that?

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Commented: (COUCHDB-570) CouchDB code improvements

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

Adam Kocoloski commented on COUCHDB-570:
----------------------------------------

Yes, but not in this case because the "unused" variable is passed on to other recursive calls to chunkify.  Trouble is, none of the clauses actually use it, and the ones that don't make recursive calls bind it as _Bt.  A bit tricky to catch.

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Updated: (COUCHDB-570) CouchDB code improvements

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

Kostis Sagonas updated COUCHDB-570:
-----------------------------------

    Attachment: DIFFS

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>            Reporter: Kostis Sagonas
>            Priority: Minor
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Closed: (COUCHDB-570) CouchDB code improvements

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

Adam Kocoloski closed COUCHDB-570.
----------------------------------

    Resolution: Fixed
      Assignee: Adam Kocoloski

Thanks again, Kostis -- applied this patch as r882903

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Assignee: Adam Kocoloski
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Updated: (COUCHDB-570) CouchDB code improvements

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

Adam Kocoloski updated COUCHDB-570:
-----------------------------------

          Component/s: Database Core
        Fix Version/s: 0.11
    Affects Version/s: 0.11

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Updated: (COUCHDB-570) CouchDB code improvements

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

Kostis Sagonas updated COUCHDB-570:
-----------------------------------

    Description: 
Finally I've found the time today to sign up to jira (username: kostis).

I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
Or maybe you prefer some other way?

Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.

Best,
Kostis

  was:
Finally I've found the time today to sign up to jira (username: kostis).

I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file?  Some other way?

Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.

Best,
Kostis


> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>            Reporter: Kostis Sagonas
>            Priority: Minor
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Commented: (COUCHDB-570) CouchDB code improvements

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

Adam Kocoloski commented on COUCHDB-570:
----------------------------------------

Thanks Kostis, in general the diff looks just fine.  Personally, I prefer not to bind too many variables in the argument list of a function and instead reserve that space for pattern matching, but in the simple cases that you/tidier chose to do this it seems fine.  I can take a closer look and apply this in the next day or two if no one beats me to it.

Thanks for the note about the partial_find/4 function, too.  That's very fresh code from Damien, perhaps he has a chance to double-check it.

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>            Reporter: Kostis Sagonas
>            Priority: Minor
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Commented: (COUCHDB-570) CouchDB code improvements

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778979#action_12778979 ] 

Jan Lehnardt commented on COUCHDB-570:
--------------------------------------

Bob, unused variables are usually reported by erlc.

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Commented: (COUCHDB-570) CouchDB code improvements

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778985#action_12778985 ] 

Jan Lehnardt commented on COUCHDB-570:
--------------------------------------

note to self: look at code before smart-assing.

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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


[jira] Commented: (COUCHDB-570) CouchDB code improvements

Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778965#action_12778965 ] 

Jan Lehnardt commented on COUCHDB-570:
--------------------------------------

Thanks Kostis, this is great!

The way of submission here is sufficient :)

Can you add a link for other to read up on tidier?

> CouchDB code improvements
> -------------------------
>
>                 Key: COUCHDB-570
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-570
>             Project: CouchDB
>          Issue Type: Question
>          Components: Database Core
>    Affects Versions: 0.11
>            Reporter: Kostis Sagonas
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: DIFFS
>
>
> Finally I've found the time today to sign up to jira (username: kostis).
> I have a whole bunch of changes to the CouchDB code which were produced by 'tidier' (Jan Lehnard knows about this).
> I am wondering what's the best way of contributing them? Create an issue and attach a patch/diff file? (I've done so)
> Or maybe you prefer some other way?
> Also, I've noticed that function couch_httpd:find_partial/4 returns either 'not_found' or {partial, N, K} but the place where this result is used (couch_httpd:673 or so) checks for matching against 'not_found' or {partial, Skip}.  Somebody needs to fix that.
> Best,
> Kostis

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