I decided to change the caller to always make sure to call commit() or the destructor is called in a write lock, for consistency.