When using doobie with fs2 stream and transaction, it only commits the transaction after the stream is drained, including any downstream operations.
For example:
val q = quote {
...
}
stream(q).transact(xa).map { _ =>
doThings() // some time consuming operation
}
The transaction is only committed (and return connection to the pool) after doThings are finished.
Is it expected behavior?