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 <[email protected]> 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:[email protected] >
