Skip to content

Clean Termination #19

Answered by tristan957
victorstewart asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Victor,

I am a newish contributor to the project and had a similar question a week or two back. My understanding is that terminating a program while KVSs/KVDBs are open is fine in the sense that you will be able to re-open the KVSs/KVDBs next time you start a program, and be able to retrieve data that had previously been flushed to disk.

The correct sequence for shutting down an HSE application is

  1. determine what to do with any active transactions (commit/abort/orphan)
  2. for each kvs, call hse_kvdb_kvs_close()
  3. for each kvdb, call hse_kvdb_close()
  4. after all kvdbs have been closed, call hse_kvdb_fini()

You can remember this sequence as the opposite of what you did to start your application.

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by smoyerx
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #19 on December 11, 2020 18:50.