code: func (vdb *versionedDB) ApplyUpdates(batch *statedb.UpdateBatch, height *version.Height) error {
  	dbBatch := leveldbhelper.NewUpdateBatch()
  	namespaces := batch.GetUpdatedNamespaces()
  	for _, ns := range namespaces {
  		updates := batch.GetUpdates(ns)
  		for k, vv := range updates {
  			compositeKey := constructCompositeKey(ns, k)
  			logger.Debugf("Channel [%s]: Applying key(string)=[%s] key(bytes)=[%#v]", vdb.dbName, string(compositeKey), compositeKey)
  
  			if vv.Value == nil {
  				dbBatch.Delete(compositeKey)
  			} else {
  				encodedVal, err := encodeValue(vv)
  				if err != nil {
  					return err
  				}
  				dbBatch.Put(compositeKey, encodedVal)
  			}
  		}
  	}
  	// Record a savepoint at a given height
  	// If a given height is nil, it denotes that we are committing pvt data of old blocks.
  	// In this case, we should not store a savepoint for recovery. The lastUpdatedOldBlockList
  	// in the pvtstore acts as a savepoint for pvt data.
  	if height != nil {
  		dbBatch.Put(savePointKey, height.ToBytes())
  	}
  	// Setting snyc to true as a precaution, false may be an ok optimization after further testing.
  	if err := vdb.db.WriteBatch(dbBatch, true); err != nil {
  		return err
  	}
  	return nil
  }
docs: // ApplyUpdates implements method in VersionedDB interface