yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches

Transaction Control Block. More...

#include <agt_cfg.h>

Data Fields

dlq_hdr_t qhdr
 queue header
 
ncx_transaction_id_t txid
 transaction ID (uint64
 
xmlChar * txid_str
 transaction ID string
 
time_t timestamp
 transaction start timestamp
 
agt_cfg_edit_type_t edit_type
 edit type enum
 
ncx_cfg_t cfg_id
 configuration datastore being edited
 
status_t validate_res
 saved validate phase status
 
status_t apply_res
 saved apply phase status
 
status_t commit_res
 saved commit phase status
 
status_t rollback_res
 saved rollback phase status
 
op_testop_t test_option
 YPW-1356: netconfd: server crash when test-option is test-only and target=running and check-root-first=true. More...
 
boolean start_bad
 running config has YANG validation errors
 
boolean rootcheck
 root-check needed flag
 
boolean rootcheck_done
 root-check done flag
 
boolean commitcheck
 commit check needed flag
 
boolean is_validate
 transaction is for the <validate> operation
 
boolean is_validate_def
 validate default flag
 
boolean is_commit
 transaction is commit candidate to running
 
boolean is_rollback
 transaction is a rollback
 
boolean is_unload
 transaction is for an unload operation
 
boolean is_commit_completeness
 Commit completeness cb flag.
 
boolean is_load
 loading startup at boot-time
 
boolean is_restore
 loading a backup file with restore operation
 
boolean is_transhook
 Trans Start-Cmplt hooks flag.
 
boolean is_cc_timeout
 Rollback is from Confirmed-Commit Timeout.
 
boolean top_replace
 top replace in progress
 
boolean force_full_root_check
 need to force a full root check
 
boolean check_redo_root_check
 need to force a full root check after patch mode validations could not process all possible changes
 
boolean fill_candidate_failed
 flag fill candidate from running failed
 
boolean skip_sil
 need to skip SIL callbacks
 
boolean no_txcb_start_comp_cb
 need to skip Transaction Start/ Complete callbacks
 
boolean skip_sil_partial
 need to skip SIL partial callbacks
 
boolean skip_save
 need to skip NV-save
 
boolean sethook_mode
 Add_edit API flag : Set hook mode flag.
 
boolean post_sethook_mode
 Add_edit API flag : Post Set hook mode flag.
 
boolean skip_cb
 Add_edit API flag : skip callback.
 
boolean hook_merge
 Add_edit API flag : hook merge flag.
 
boolean check_duplicate_silcall
 check duplicate SIL call
 
boolean root_check_first
 need root-check first
 
boolean root_check_first_done
 root-check first done flag
 
boolean silcall_invoke_only_sethook
 TRUE if the only set-hook callbacks should be invoked.
 
boolean need_reverse_edit
 TRUE if remote edit on multiple subsystems failed and now a reverse edit is needed.
 
boolean test_only_cleanup
 TRUE if the rollback is not an error but just a cleanup for a test-only edit transaction.
 
const xmlChar * comment
 comment provided by the caller: do not clone; just use backptr!!
 
dlq_hdr_t undoQ
 each distinct effective edit point in the data tree will have a separate undo record in the undoQ

 
dlq_hdr_t auditQ
 TBD: this is redundant and can be derived from the undoQ contains edit record highlights used in the sysConfigChange notification and netconfd audit log

 
dlq_hdr_t deadnodeQ
 contains nodes marked as deleted by the delete_dead_nodes test used for false when-stmt test deletions
 
struct agt_cfg_nested_silcall_t_ * cur_silcall
 Q of ncx_backptr_t to xpath_pcb_t for keeping track of which auxillary must-stmt validation tests and when-stmt deletion tests that have already been checked for all external XPath tests during the current commit. More...
 
dlq_hdr_t transhookQ
 Queue of the Transaction Hook callbacks rigistered for the current transaction. More...
 
dlq_hdr_t newmpidQ
 Queue of backptrs to undo records that are for the creation of an MPID for schema mount This will be applied after the transaction is completed OK. More...
 
dlq_hdr_t silcallQ
 Q of agt_cfg_silcall_t used to track which objects have remote SIL callbacks involved in this transaction.
 
dlq_hdr_t silcall_undoQ
 silcall undo Q
 
boolean silcall_undo_mode
 silcall undo mode active
 
boolean silcall_done
 silcall done flag
 
boolean skip_silsa_hooks
 need to skip SIL-SA hooks
 
boolean subsys_add_edit_mode
 add_edit mode form subsystem
 
boolean cancel_done
 cancel transaction must only be done once
 
dlq_hdr_t added_silcallQ
 Q of agt_cfg_silcall_t used to track which objects have remote SIL callbacks involved in this transaction added by Set Hook edit.
 
boolean enable_force_delete
 YPW-2210: this is EDIT2 merge with Deletes Mode The delete mode is set in check_commit_deletes() API.
 
dlq_hdr_t sethookQ
 Queue of the Set Hook callbacks (agt_cfg_set_hook_t) registered for the current transaction. More...
 

Detailed Description

Transaction Control Block.

struct representing 1 configuration database edit transaction

  • A NETCONF transaction is any write attempt to a specific config.
  • Each <edit-config> on candidate or running is a separate transaction.
  • A commit is a separate transaction, and all individual edits to candidate are ignored, and a new transaction change set is calculated.
  • Save from running to startup is a separate transaction.
  • The validate operation (or edit-config in test-only mode) will cause a transaction ID to be used, even though no writes are ever done. The txid must be the same for validate and apply/commit phases.

Each transaction gets a new auto-incremented transaction ID which is saved in a file across reboots. It is only updated when the NV-storage version of the config is written, or upon a clean exit. This means that a program or computer crash could cause transaction IDs to be reused upon a restart, that were previously used for candidate or running.

Incremental rollback based on undoQ contents is still TBD, so qhdr and last_transaction_id are not really used yet

Field Documentation

◆ cur_silcall

struct agt_cfg_nested_silcall_t_* cur_silcall

Q of ncx_backptr_t to xpath_pcb_t for keeping track of which auxillary must-stmt validation tests and when-stmt deletion tests that have already been checked for all external XPath tests during the current commit.

set while making SIL callbacks only

◆ newmpidQ

dlq_hdr_t newmpidQ

Queue of backptrs to undo records that are for the creation of an MPID for schema mount This will be applied after the transaction is completed OK.

The MPID needs to be added to the rootcb or just delete the Q of backptrs

◆ sethookQ

dlq_hdr_t sethookQ

Queue of the Set Hook callbacks (agt_cfg_set_hook_t) registered for the current transaction.

They are called before all SIL callbacks.

◆ test_option

op_testop_t test_option

YPW-1356: netconfd: server crash when test-option is test-only and target=running and check-root-first=true.

Added test_option member to hold test-option value from the input

◆ transhookQ

dlq_hdr_t transhookQ

Queue of the Transaction Hook callbacks rigistered for the current transaction.

They are called after all SIL callbacks are done.


The documentation for this struct was generated from the following file: