You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/11/11 15:56:11 UTC
[GitHub] [couchdb] nickva commented on issue #2225: Reuse the open
transaction for include_docs=true responses
nickva commented on issue #2225: Reuse the open transaction for include_docs=true responses
URL: https://github.com/apache/couchdb/issues/2225#issuecomment-552501647
A simple thing to try would be to wrap the whole db request function in a transaction:
https://github.com/apache/couchdb/blob/ff2cdb84f639ea26ac7b1ad85abb0a49c5141c74/src/chttpd/src/chttpd_db.erl#L385-L386
So it would look something like:
```
fabric2_fdb:transactional(Db, fun(TxDb) -> Fun(Req, TxDb) end)
```
We might hit issues with transaction size limits or timeouts sooner. For reads, values are not included in the size limit, but keys and conflicts ranges are. Perhaps we could track transaction size estimates and/or age and do something clever like start a new transaction if we reach the limits. Perhaps snapshot reads might also be useful here, as the long transaction could now easier conflict with other updates and retry too often.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services