The underlying blocking calls - the append and appendBatch calls in the Thrift client, call the sendBase method in thrift which increments the seq id of the message. If the next response received is not the same sequence id, then an IllegalStateException is thrown. Basically after a message is sent, the response received must be of the same sequence id. So we need to make our methods synchronized/locked to make sure a different thread does not call append/appendBatch methods.
I think the implementation in the current patch is reasonably clean, and is a standard implementation technique used in distributed systems.