code: func (s *State) Update(updater func(up Updatable) error) ([]byte, int64, error) {
  	s.Lock()
  	defer s.Unlock()
  	err := updater(&s.writeState)
  	if err != nil {
  		return nil, 0, err
  	}
  	return s.commit()
  }
docs: // Perform updates to state whilst holding the write lock, allows a commit to hold the write lock across multiple
  // operations while preventing interlaced reads and writes