Write at the same key within the same Txn

Hey, Badger authors (and users):

I have a question about a corner cases: within the same writing Txn, if I happen to write at the same key multiple times (from different functions, with the same *Txn object), what’s the writing behavior from badger? Will it simply honor the latest (among all at the same key)?


Kevin Yang

The latest one would get applied, rest would be discarded.

thanks, that’s resonable.

I was hoping Txn can smartly combine everything together though. :slight_smile:

You might want to look at the merge functionality.

1 Like