Image copyright AP Image caption Dogs for sale at the Yulin at the dog-meat festival

This week about 10,000 dogs and a number of cats were killed at an annual dog-meat festival in south-western China, to celebrate the longest day of the year. For the BBC's Juliana Liu it was a reminder of one of the most traumatic days of her childhood, in the Chinese city of Changsha.

When I was three years old, after months of begging, my parents finally gave in to my pleas for a puppy.

The day that my uncle, a lorry driver, brought me a fuzzy yellow mongrel from my grandmother's mountainous, faraway home was the happiest of my young life.

I named him "Doggie", and we immediately became inseparable.

As an only child born in 1979 at the beginning of China's one-child policy, I had always been alone, and Doggie became my best friend. He loved running around outside our one-room flat, gobbling up left-over rice and snuggling near the coal fire.

But these halcyon days did not last. After just one winter, my parents told me Doggie had to go.

In Chinese cities in the early 1980s owning a pet was considered highly undesirable, bourgeois behaviour. None of my neighbours had one. It was also not entirely legal. There was no access to animal vaccines or vets, so pets could pose a public health risk.

One day, my mother announced we were going shopping - and when we returned a few hours later Doggie was no more. He had been strung up by the legs in our communal yard, and was soon turned into a stew, complete with herbs and hard-boiled eggs.

No-one paid any attention to my tears. I heard the neighbours say I would soon forget the whole thing.

They, on the other hand, were in a celebratory mood. In the years before China's economic boom, when some food was still rationed, it was rare to have the chance to feast on a whole animal.

I refused to eat the stew - and I have never eaten dog in my life.

Image copyright Reuters Image caption Men eating dog at the Yulin dog-meat festival, June 2015 © Reuters

In China, the tradition of dog-eating goes back far beyond written history.

Along with pigs, oxen, goats, horses and fowl, dogs are one of the six animals domesticated during the Stone Age.

On the other hand, it is not the kind of thing that is eaten every day. It is a speciality meat, commonly believed to confer strength, vigour and virility on the eater.

How dog is eaten

Chinese food expert Fuchsia Dunlop writes:

Judging by the sporadic waves of outrage about dog-eating in China, you might think it was one of the pillars of the Chinese diet. Actually, however, the consumption of dog meat is extremely marginal: it's seldom seen in markets and on restaurant menus, and most Chinese people eat it rarely, if at all.

Dogs, like pigs, have been reared for their meat in China since the Neolithic age, but in modern times their flesh is regarded as a delicacy in just a few areas, such as Hunan and Guizhou. Even in these places, it tends to be eaten only occasionally, and in certain seasons. According to traditional Chinese medicine, dog is a "heating" meat which can offer a useful energy boost in midwinter, but is best avoided after the lunar new year.

In culinary terms, dog meat is normally blanched or soaked before cooking to dispel the earthier, heavier aspects of its flavour. It is then, typically, made into slow-cooked soups and stews seasoned with ginger, spring onion, rice wine and spices, although it may also be roasted, or served cold as an appetiser. The tender meat of puppies is favoured over that of older dogs.

In the course of many years of studying Chinese cuisine, I've only eaten dog meat on a handful of occasions. The first time, it reminded me of pork; the second, in a fiendishly spicy Hunanese stew, it recalled the taste of lamb.

About 716 million pigs are slaughtered in the country every year, and 48 million cattle. The number of dogs slaughtered is far lower - one animal rights group puts the figure at about 10 million.

But where do these dogs come from? According to some researchers, many are pets - like Doggie, except they have been stolen from their owners.

As dogs were arriving for the dog-meat festival at Yulin in Guangxi province this week, Peter Li of Humane Society International saw no animals with quarantine inspection certificates to indicate they had been farmed.

"All of them can be suspected to be stolen urban pets, rural guard dogs and stray dogs and cats," he says.

Image copyright AFP Image caption Dogs for sale at a market in Yulin © AFP

A four-year inquiry into the dog-meat industry by Animals Asia also concluded that most dogs eaten in China are stolen.

"During the entire investigation, we found no evidence of any large-scale breeding facilities, where 100-plus dogs were bred and raised," says the report published earlier this month.

"The difficulty of large-scale breeding of dogs for food and the greed for profit give rise to stealing, snatching from the streets and even poisoning of dogs."

But Li says there is mounting pressure on Chinese authorities to take action against the eating of pets - and that society is turning against the idea of eating dog altogether.

There were far fewer stalls selling dog and cat meat at the Yulin festival this year than in 2014, he says.

"The overall attitude is against dog eating. China has 130 million dogs, of which 27 million are urban pets. That's a big number of pet owners.

"The younger generation, born in the 1990s, is not tolerant of animal cruelty."

Image copyright AFP Image caption A protester shouts slogans condemning the slaughter of dogs at the Yulin festival © AFP

Image copyright AFP Image caption Activists gave a dog a basket with the message "Child for sale" © AFP

In 2014, animal rights activists intercepted 18 lorries carrying dogs intended for eating, resulting in the rescue of some 8,000 animals, he says.

The Chinese media often carries stories of such rescues, in which activists force vehicles to stop and pool money to purchase the animals.

He dates the rise of animal protection activism in China to 2011, the same year when, for the first time ever, more people lived in cities than the countryside.

City dwellers, he says, view dogs and cats more as pets, rather than as working animals - guard dogs, for example - or sources of meat.

In May, on a visit to Shanghai, I saw a sight that delighted me.

While strolling on the Bund, I stopped a young tourist named Yang Yang who was carrying her tiny, fox-like dog in a sling on her chest, the way I normally carry my human baby.

"Oh, this way I can take him into restaurants and on airplanes," she explained. "Otherwise, he wouldn't be allowed in with me. Where I go, he goes."

All three of us posed for a photo in front of Shanghai's iconic skyline.

How I wish more people had taken this attitude three decades ago.

My parents, now utterly embarrassed about having allowed my pet to be cooked, generally avoid the topic entirely.

But when I was five years old, my father left China to study abroad and the very first gift he sent me was a fuzzy, yellowish stuffed puppy.

I named him Doggie.

To this day, wherever I go, he is with me.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.