patch by Ling Mao; reviewed by David Capwell, Stefan Miklosovic for CASSANDRA-21301 Co-authored-by: David Capwell <dcapwell@gmail.com>