Based on the GoDoc of
.NewTransaction method of Badger it’s clear that Transaction is not thread-safe. But reading the GoDoc for
.NewInterator method it seems that in read-only transactions multiple concurrent iterators can exist. It’s a bit unclear how this should be done though.
- Is it correct that Transaction struct is not thread-safe even if it’s read-only?
- If it’s true, does this include
- If that is true, does it mean that in order to create concurrent iterators in a read-only transaction one would need to create all the iterators first, and then start the goroutines that would use the iterators?
Thanks a lot!