The russian federation wants to start a new wave of mobilization and recruit up to 500 thousand conscripts, although it will be a problem for the Kremlin to arm at least half of this mass of troops. And it can be argued that communist China was already in a situation similar to the current one, when in 1979, with its great resources, it resoundingly lost the war against Vietnam, exhausted by several decades of war for its independence.
The war between China and Vietnam in 1979 lasted only a month. But the defeat turned out to be so catastrophic for the PRC that Beijing was forced to start large-scale reforms, the inertia of which continues even now, in 2023.
The reason for starting the war for China was the successful intervention of Vietnam in Cambodia in December 1978 against the regime of Pol Pot. It's not that the Vietnamese wanted to enter another war, it's just that when an aggressive neighbor opened a "branch of hell on earth", attacks border villages and proclaims the slogan "700 years against Vietnam", then the problem could only be solved applying by force. So,Vietnam equipped a group of its best troops: 14 divisions, or about 130 thousand servicemen supported by tanks and aviation. In this case Vietnam ignored the fact that the main ally of the regime in Cambodia was actually communist China. With this country Vietnam had a similar history of existential conflicts as well, the same as Ukraine and russia for the last 300 years.
The defeat of the main part of the "Khmer Rouge" groups in Cambodia took only 2 weeks. But what in modern parlance is called "stabilization measures" took much longer for the Vietnamese army, lasting at least until early February 1979. When China decided to conduct its own "special military operation" against Vietnam, it caused something like "civilization shock": one communist country fighting another for a successful intervention against a third.
When planning the war against Vietnam, the Chinese military had the following idea: to collect a large number of troops (up to 600 thousand militarymen, according to some estimates) and advance on a front as wide as 800 km to exhaust as many Vietnamese troops as possible. Then approach to the capital of Vietnam, Hanoi, and the second largest city, Haiphong; destroy the infrastructure as much as possible and decrease the combat capability of the Armed Forces of Vietnam; finally to impose their conditions of "political settlement of the conflict". Beijing planned to conduct its operation within only 2 weeks. But when planning the war, the Chinese did not take into account some factors that caused the fiasco.
For example, during the time of Mao Zedong in the 1970s, the Chinese People's Liberation Army (PLA) switched to the concept of "people's total war". Therefore, they did not have professional officers capable of effectively conducting battles and planning logistics, and the units with the functions of the prototype of the Special Operations Forces were eliminated. Therefore, the only thing that the Chinese military was able to do in its total mass was to attack with the support of a "valley of fire" of artillery and a mass of tanks, and to attack the enemy's positions with waves of "cannon fodder".
The Chinese also did not take into account the fact that Vietnam had well-armed border troops and "people's militia forces" (something similar to the then-terrodefense), a total of 100,000 fighters with small arms and light artillery, supported by light armored vehicles and MLRS. Such formations were distinguished by the ability to build "horizontal" communication between themselves and the ability to act "guerrilla-like" on the enemy's communications. And it was these forces that played the main role in delaying the advance of Peking's forces, where the "best" result was only 44 km of advance deep into the territory of Vietnam on one of the narrow sections of the front.
It is telling that Vietnam never began to withdraw its best troops from Cambodia, because it wanted to complete "stabilization measures" on the territory of the country. In some ways, even "guerrillas" were enough to defeat China, thanks to that even those Chinese troops who occupied positions a few kilometers from the nearest highways and railways were without ammunition and food.
The example of China's loss in the war against Vietnam in 1979 is also relevant in 2023 due to the following structure of the situation: the armies of both countries at that time were engaged in long-term hostilities (even if against "third parties", not one against the other), so they possessed a certain "baggage" of combat experience and demobilized manpower.
It was a clash of two mass armies, each of them "sprouted" from the Soviet military school. And the victory here belonged to the army that managed to "outgrow" its "Soviet heritage" and defeated the enemy thanks to better maneuverability in defense and due to accurate strikes on the logistics of the enemy forces.