﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Damien Katz commented on More CouchDB reading: btree:query_modify</title><description>Great posts! A few answers:
  
  
The ideal size of CHUNK_THRESHOLD was determined to be 0x4FF when timing some test runs on my MacBook Pro. Yup, it's all part of the chunkify function (chunking a large btree node into smaller nodes), which sucks :)
  
  
&gt; Why is this happening after we write to file?
  
The reduction is stored in parent node. We write the node, reduce the node and then store the reduction results with the pointer in the parent node.
  
  
&gt; How does this relate to CouchDB's ability to shell out to java script in order to perform maps and reductions?
  
  
The btree code doesn't know about javascript, it is just given map and reduce functions to call. The view engine provide the map and reduce functions,  and those functions then do the talking to external code.
  
  
  
&gt; What ensure that the ordering of the node reduction match the tree hierarchy?
  
  
The reduction functions are supposed to commutative and associative, so the order in which reduction results are calculated doesn't matter. I think that answers the question?
</description><link>http://ayende.com/3609/more-couchdb-reading-btree-query-modify#comment1</link><guid>http://ayende.com/3609/more-couchdb-reading-btree-query-modify#comment1</guid><pubDate>Wed, 24 Sep 2008 15:08:40 GMT</pubDate></item></channel></rss>