You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Boaz Citrin <bc...@gmail.com> on 2015/01/21 14:32:00 UTC

Outdated view right after bulk document update

Hello,

We are having a strange issue using the bulk document API of couchdb 1.2.1;

1. We have a view on a field say 'directory'.
2. We send a bulk update for 50+ documents changing their 'directory'
3. We send a view query with the key being the former directory value
4. Response contains documents that should have been changed.
5. Sending a second request after a fraction gives an empty expected
response.

Note that we don't query with stale=ok.

Any idea?

Thanks!

Boaz

Re: Outdated view right after bulk document update

Posted by Stanley Iriele <si...@gmail.com>.
I think it literally is because if when couchdb runs fsync and flushes your
upload to disk. I think if you waited a second you will see your changed.
Even though waiting is a terrible solution... It should show up after you
call the view though. Some developer should answer your question soon enough
On Jan 26, 2015 2:13 PM, "Boaz Citrin" <bc...@gmail.com> wrote:

> so... does anyone have an idea why a view can be outdated right after a
> bulk update?
>
> On Thu, Jan 22, 2015 at 8:30 AM, Boaz Citrin <bc...@gmail.com> wrote:
>
> > Yep, right after the update, is this an expected behavior?
> > Can setting *delayed_commits *to true improve/fix this? Can it affect
> > performance noticeably?
> >
> > Thanks!
> >
> >
> > On Wed, Jan 21, 2015 at 11:43 PM, Stanley Iriele <si...@gmail.com>
> > wrote:
> >
> >> Are you calling the view right after?...this is just a thought but they
> >> may
> >> not have committed to disk yet at that point
> >> On Jan 21, 2015 5:33 AM, "Boaz Citrin" <bc...@gmail.com> wrote:
> >>
> >> > Hello,
> >> >
> >> > We are having a strange issue using the bulk document API of couchdb
> >> 1.2.1;
> >> >
> >> > 1. We have a view on a field say 'directory'.
> >> > 2. We send a bulk update for 50+ documents changing their 'directory'
> >> > 3. We send a view query with the key being the former directory value
> >> > 4. Response contains documents that should have been changed.
> >> > 5. Sending a second request after a fraction gives an empty expected
> >> > response.
> >> >
> >> > Note that we don't query with stale=ok.
> >> >
> >> > Any idea?
> >> >
> >> > Thanks!
> >> >
> >> > Boaz
> >> >
> >>
> >
> >
>

Re: Outdated view right after bulk document update

Posted by Boaz Citrin <bc...@gmail.com>.
so... does anyone have an idea why a view can be outdated right after a
bulk update?

On Thu, Jan 22, 2015 at 8:30 AM, Boaz Citrin <bc...@gmail.com> wrote:

> Yep, right after the update, is this an expected behavior?
> Can setting *delayed_commits *to true improve/fix this? Can it affect
> performance noticeably?
>
> Thanks!
>
>
> On Wed, Jan 21, 2015 at 11:43 PM, Stanley Iriele <si...@gmail.com>
> wrote:
>
>> Are you calling the view right after?...this is just a thought but they
>> may
>> not have committed to disk yet at that point
>> On Jan 21, 2015 5:33 AM, "Boaz Citrin" <bc...@gmail.com> wrote:
>>
>> > Hello,
>> >
>> > We are having a strange issue using the bulk document API of couchdb
>> 1.2.1;
>> >
>> > 1. We have a view on a field say 'directory'.
>> > 2. We send a bulk update for 50+ documents changing their 'directory'
>> > 3. We send a view query with the key being the former directory value
>> > 4. Response contains documents that should have been changed.
>> > 5. Sending a second request after a fraction gives an empty expected
>> > response.
>> >
>> > Note that we don't query with stale=ok.
>> >
>> > Any idea?
>> >
>> > Thanks!
>> >
>> > Boaz
>> >
>>
>
>

Re: Outdated view right after bulk document update

Posted by Boaz Citrin <bc...@gmail.com>.
Yep, right after the update, is this an expected behavior?
Can setting *delayed_commits *to true improve/fix this? Can it affect
performance noticeably?

Thanks!


On Wed, Jan 21, 2015 at 11:43 PM, Stanley Iriele <si...@gmail.com>
wrote:

> Are you calling the view right after?...this is just a thought but they may
> not have committed to disk yet at that point
> On Jan 21, 2015 5:33 AM, "Boaz Citrin" <bc...@gmail.com> wrote:
>
> > Hello,
> >
> > We are having a strange issue using the bulk document API of couchdb
> 1.2.1;
> >
> > 1. We have a view on a field say 'directory'.
> > 2. We send a bulk update for 50+ documents changing their 'directory'
> > 3. We send a view query with the key being the former directory value
> > 4. Response contains documents that should have been changed.
> > 5. Sending a second request after a fraction gives an empty expected
> > response.
> >
> > Note that we don't query with stale=ok.
> >
> > Any idea?
> >
> > Thanks!
> >
> > Boaz
> >
>

Re: Outdated view right after bulk document update

Posted by Stanley Iriele <si...@gmail.com>.
Are you calling the view right after?...this is just a thought but they may
not have committed to disk yet at that point
On Jan 21, 2015 5:33 AM, "Boaz Citrin" <bc...@gmail.com> wrote:

> Hello,
>
> We are having a strange issue using the bulk document API of couchdb 1.2.1;
>
> 1. We have a view on a field say 'directory'.
> 2. We send a bulk update for 50+ documents changing their 'directory'
> 3. We send a view query with the key being the former directory value
> 4. Response contains documents that should have been changed.
> 5. Sending a second request after a fraction gives an empty expected
> response.
>
> Note that we don't query with stale=ok.
>
> Any idea?
>
> Thanks!
>
> Boaz
>