CLEREZZA-867: locking graph during serialization