Atomic mutateIn remove operations

Hi @burak.dursunlar
No there’s no such conditional mutateIn operator.
But here’s a little trick you can use:

val mutateInSpecs = Seq(
 MutateInSpec.upsert("a", ""),
 MutateInSpec.upsert("b", ""),
 MutateInSpec.remove("a"),
 MutateInSpec.remove("b")
)

If that makes sense? E.g. by always upserting the fields first, you guarantee that they’re present when the removes run.

2 Likes