basho/yokozuna — pull request #47 by coderoshi (2013-03-28 21:14:06+00:00)
Title: Add Kill Switch

There may be cases where the user wants to temporarily disable any further indexing of objects.

* Heavy cluster load.

* Hunting down performance issues in production.

* Solr issues causing indexing to fail.

* Etc.

This **SHOULD NOT** be implemented by setting `yz_index_content` to `false`. This will still index objects and cause the AAE trees to be cleared.

I think two potential implementations are:

1. Hot-swap `yz_kv:index` function to be a no-op.

2. Use a flag stored in process dict and check it each time.

I like the first option a little more because a) doesn't rely on fact that indexing is done on KV vnode and thus there are long-lived process dict entries and b) premature optimization says this method is less overhead.