Top choice container can query after confd restart

when the top container is choice, after confd restart, NBI can’t get the correct value.

my yang module

module e-complete {
	yang-version "1.1";
	namespace urn:rdns:com:e:oammodel:e-complete;
	prefix ecomplete;

	import tailf-common {
    		prefix tailf;
	}

	import ietf-yang-types {
    		prefix yang;
	}

	uses nested-choices;

	grouping nested-choices {
		container food {
			choice snack {
				case sports-arena {
					choice subsnack {
						case baseball-arena {
							leaf beer {
								type empty;
							}
						}
						case icehockey-arena {
							leaf pretzel {
								type empty;
							}
						}
					}
				}
				case late-night {
					leaf chocolate {
						type enumeration {
							enum dark;
							enum milk;
							enum first-available;
						}
					}
				}
			}
		}
	}
}

my configuration

{
	"e-complete:food": {"chocolate": "milk"}
}

step 1: Restart confd

step 2: my NBI command and response

<?xml version="1.0" encoding="UTF-8"?>
	<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
		<get-config>
			<source><running/></source>
			<filter type="subtree">
				<food xmlns="urn:rdns:com:e:oammodel:e-complete">
				</food>
			</filter>
		</get-config>
	</rpc>
]]>]]>

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
	<data></data>
</rpc-reply>]]>]]>

step 3: If I update {“chocolate”: “dark”}, then run query it through NBI, i can get the new chocolate type.

Note: The issue only happens on top choice container.

I cannot reproduce the problem. What ConfD version are you using? Also, is there any data provider / external database involved?

confd version: 7.4
Yes, we use data provider and external database.

It looks like a problem of the data provider then - any get-config request is translated to callbacks like get_elem or get_case to the data provider by confd, there is no value caching by confd. I suggest you take a look at what requests and values are sent from confd, and what responses are sent by your data provider (confd logs requests and responses in devel.log, but without values).