Why does candidate DB write still call confd_data_cbs 's create?

Hey Everyone ,

To understand usage of candidate DB along with external DB for the main running DB ,
I changed the confd.conf of user_guide_examples/simple_notrans,to use the confd db as candidate data store.


because I wish to use confd’s db only for candidate datastore.

then with CLI-c I tried creating/deleting configurations in the candidate DB using ‘config exclusive’ ,

But ,noticed the confd_data_cbs 's create/ confd_data_cbs 's remove callback being executed.

Am having trouble understanding why this is happening, I assumed the role of storing config the candidate data ,now is being done by confd.

am I using supposed to clear these (create/delete) call backs ,when confd_trans_cbs’s init is called again when switching from running to candidate db , Am I missing something here?


Since you didn’t describe the exact CLI commands in your posting, I am assuming that the actual create and remove callbacks are being invoked as a result of your commit operation. Upon execution of the commit operation, the contents of the candidate datastore will be copied over to the running datastore which is the external database for this example, hence the invocation of the create/set/remove callbacks to make the changes to the external database.

If you would like to have the ability to leave the contents of the candidate datastore intact when exiting from the CLI’s config mode, you will need to use “config shared”. This allows the candidate datastore to be edited by one or more users over one or more northbound sessions.

Your above changes to the confd.conf file to enable the candidate datastore isn’t the recommended configuration. Refer to http://discuss.tail-f.com/t/candidate-datastore/145/2?u=waitai for the description of the recommended configuration when enabling the candidate datastore.

1 Like

thanks for your help :slight_smile: