couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <fdman...@apache.org>
Subject Re: [2/5] git commit: use couch_db calls instead of couch_btree
Date Wed, 09 Nov 2011 21:03:46 GMT
On Wed, Nov 9, 2011 at 7:00 PM, Randall Leeds <randall.leeds@gmail.com> wrote:
> On Wed, Nov 9, 2011 at 02:48, Robert Newson <rnewson@apache.org> wrote:
>> Randall,
>>
>> Did we miss the chance to review this work before it landed?
>
> Yes. Sorry. I thought it was more trivial than it was. I owe it to
> Filipe for catching the mistake.
> While I changed get_design_docs not to get the body by default (I like
> this change), he's correct that it skips deleted docs and that would
> break _changes.

No sweat. I noticed after getting back home that there's a subsequent
commit that change couch_db:get_design_docs/1 which makes it return
only the full_doc_info records.

Avoiding doing this directly in couch_changes is fine for me. The
intention is good. Agree with Benoit that the couch_db function could
take parameters to tell if deleted docs are to be returned or not and
opt for docs or just full_doc_infos.

thanks

>
> My apologies, Bob. I've just reverted it.
>
>>
>> B.
>>
>> On 9 November 2011 10:36, Benoit Chesneau <bchesneau@gmail.com> wrote:
>>> On Wed, Nov 9, 2011 at 11:27 AM, Filipe David Manana
>>> <fdmanana@apache.org> wrote:
>>>> Randall, I have to disagree on this one.
>>>>
>>>> The reason to not call couch_db:get_design_docs/1 is to avoid reading
>>>> the body of the documents, which is not needed.
>>>>
>>>> Plus, couch_db:get_design_docs/1 skips deleted documents, which will
>>>> causes _changes rows to be skipped.
>>>>
>>>
>>> maybe couch_db:get_design_docs could take some options to handle the
>>> case. I think it's a good idea to use couch_db as abstraction to the
>>> deep level.
>>>
>>> - benoit
>>>
>>
>



-- 
Filipe David Manana,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

Mime
View raw message