Skip to content

Transaction only commited after stream is drained #2132

@wb14123

Description

@wb14123

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions