incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: view response with duplicate id's
Date Wed, 06 Oct 2010 19:56:17 GMT
It was noted on IRC that I should give a bit more explanation.

With the information that you've provided there are two possible
explanations. Either your client code is not doing what you expect or
you've triggered a really crazy bug in the view indexer that caused it
to reindex a database without invalidating a view and not removing
keys for docs when it reindexed.

Given that no one has reported anything remotely like this and I can't
immediately see a code path that would violate so many behaviours in
the view updater, I'm leaning towards this being an issue in the
client code.

If there was something specific that changed since the view worked,
that might illuminate what could cause this sort of behaviour if it is
indeed a bug in CouchDB.

HTH,
Paul Davis

On Wed, Oct 6, 2010 at 12:24 PM, Alexey Loshkarev <elf2001@gmail.com> wrote:
> I have such view function (map only, without reduce)
>
> function(doc) {
>  if (doc.type == "queue") {
>    emit(doc.ordering, doc.drivers);
>  }
> }
>
> It works perfect till yesterday, but today it start return duplicates
> Example:
> $ curl http://node2:5984/exhaust/_design/queues/_view/all
>
> {"total_rows":46,"offset":0,"rows":[
> {"id":"q_mashinyi-v-gorode","key":0,"value":["d_mironets_ivan","d_smertin_ivan","d_kasyanenko_sergej","d_chabotar_aleksandr","d_martyinenko_yurij","d_krikunenko_aleksandr"]},
> {"id":"q_mashinyi-v-gorode","key":0,"value":["d_mironets_ivan","d_smertin_ivan","d_kasyanenko_sergej","d_chabotar_aleksandr","d_martyinenko_yurij","d_krikunenko_aleksandr"]},
> {"id":"q_mashinyi-v-gorode","key":0,"value":["d_mironets_ivan","d_smertin_ivan","d_kasyanenko_sergej","d_chabotar_aleksandr","d_martyinenko_yurij","d_krikunenko_aleksandr"]},
> ......
> {"id":"q_oblasnaya","key":2,"value":["d_kramarenko_viktor","d_skorodzievskij_eduard"]},
> {"id":"q_oblasnaya","key":2,"value":["d_kramarenko_viktor","d_skorodzievskij_eduard"]},
> {"id":"q_oblasnaya","key":2,"value":["d_kramarenko_viktor","d_skorodzievskij_eduard"]},
> ........
> {"id":"q_otstoj","key":11,"value":["d_gavrilenko_aleksandr","d_klishnev_sergej"]}
> ]}
>
>
> I tried to restart server, recreate view (remove view index file),
> compact view and database and none of this helps, it still returns
> duplicates.
> What happens? How to avoid it in the future?
>
> --
> ----------------
> Best regards
> Alexey Loshkarev
> mailto:elf2001@gmail.com
>

Mime
View raw message