hmsonline/cassandra-indexing — pull request #12 by boneill42 (2013-06-19 02:36:35+00:00)
Title: Creates a thread pool for index writes.

I think I may have uncovered a bug. Since Cassandra uses ThreadLocal to persist state information, and part of that state information is the current keyspace, in some situations the AOP was changing the keyspace, then leaving that socket + keyspace combination in a bad state that didn't match what it would have been w/o the AOP.

It resulted in a very strange error where Hector thought it was in one keyspace, and C* thought the same connection was in another. This PR has a quick fix, which forks the index writes off into separate threads. But we should probably consider what to do with this.