Update alg doc for upsert