Can you please help me understand the flow for the external db integration, if the flag is set to “test-then-set” . For a single interface delete operation, the CONFD send get on the all the interfaces and other module also. Is it expected behavior ? How can we control this ?
Yes, it is expected, based on your data model and the actual configuration change. The most common reason is that the data model contains constraints (such as leafrefs or must expressions) that force ConfD to go over big part of the configuration to validate it.
You should probably start by trying to identify why ConfD needs to do that; to do so you may enable XPath trace log and inspect it after such configuration change. Once you know the reason you may be able to deal with the problem by fine-tuning the constraints (possibly adding tailf:dependency statements). If all fails, you can still try to improve the ConfD <-> data provider communication by implementing “bulk methods”, if you have not done so yet.
Regardless of the value of the test option, the configuration still must be validated before it is applied to the running datastore, that’s why you see lots of get callback invocations. There is no configuration option that would turn this validation off.
You can affect that however: if the data model is under your control, you can tweak the constraints that are causing this, up to the point that you remove them completely and implement the validation only in your database (note that this is somewhat extreme solution). If you are not the owner of the YANG modules, you can still do a lot here either using YANG annotations or, in the worst case, deviations.
Again - I suggest you first try to identify what constraint or constraints are causing this behavior.