couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imre SZEBENYI <>
Subject deterministic view?
Date Wed, 25 Apr 2012 13:45:11 GMT

We have a database with ~ 7000 documents. (machine profiles)
There's a changelog field in the doc, and the map function
calculates the number and the age of the disks for every day.

This means that if the machine has 24 bay, then
I will call this 24 times:


On this day the machine had 24 disk, they were 14 month old.
Because a machine usually "lives" 3 years,
this means 3*365*24 ~ 26280 emits per document.

The view has a reduce function too: "_sum".

We have a design document for the views, and we have 24 views in it.
But if I put the _same_ code into a different design
document (only one view) the results are different.

I got a lot of errors like this:

[Wed, 25 Apr 2012 13:10:23 GMT] [info] [<0.135.0>] OS Process 
#Port<0.2067> Log :: function raised exception (new 
TypeError("changelog[loopTime] is undefined", "", 124)) with doc._id 
cd1001402 HPC

But _only_ when the "big"  design (24 views) document is recalculated.
The "small" one is ok, and the numbers (the output) is ok too.
Again: the same view code.

Couchdb 1.1.1

Any idea?


View raw message