Melvin Ross <melvi...@...>
I've been going through the Janus source and noticed that the Hbase and Cassandra backends both call sleepAfterWrite after sending the write request to the underlying backend. What I can't seem to comprehend is why. It doesn't have a JavaDoc block, but this seems like a bug due to the fact that the function immediately before it had a javadoc, but its commented out.
My original thought was that it was to ensure that we don't create another transaction on the same thread that reuses the the exact same timestamp. However, at least in the CQL cassandra implementation, it's already blocking for the write result.
But a few lines lower at 419, sleepAfterWrite is called. The thread's already sent the statements to Cassandra, and gotten a response at that point. Why is it sleeping? I'm hoping the rest of you can shed some light onto this and tell me what I'm missing.
The astyanax, embedded and thrift implementations seem to be synchronous as well, but also sleep.