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 2021/11/02 13:15:44 UTC

[GitHub] [couchdb-erlfdb] kocolosk commented on issue #30: `Close` api is not supported?

kocolosk commented on issue #30:
URL: https://github.com/apache/couchdb-erlfdb/issues/30#issuecomment-957547020


   Good question! Yes, the only place where we stop the network thread is when the erlfdb code is purged from the VM.
   
   The FoundationDB C client code has this property that there is at most one network thread for communication between a client and a given cluster for the life of the client process. It is possible to stop that thread with `fdb_stop_network()`, but once you do that you cannot start the thread again. More details on that design here:
   
   https://apple.github.io/foundationdb/api-general.html#client-network-thread
   
   So we are really just aligning to the standard FoundationDB client/server pattern here: a client maintains a single, long-lived connection to the server, and all transactions are multiplexed onto that connection. Each transaction can be committed / aborted independently.
   
   If you _really_ needed to close the connection but keep the Erlang VM running you might be able to do it by purging erlfdb, and then loading it back in again later if you needed to reconnect, but in practice this isn't something that we've had any need to do (or have done any testing around).


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org