Between 1917 and 1930, homosexuality was decriminalised in the Soviet Union. From the Wikipedia article on LGBT history in Russia:
The Russian Communist Inessa Armand publicly endorsed both feminism and free love, but never directly dealt with LGBT rights. The Russian Communist Party effectively legalized no-fault divorce, abortion and homosexuality, when they abolished all the old Tsarist laws and the initial Soviet criminal code kept these liberal-libertarian sexual polices in place. During this time, openly gay persons were able to serve in Russia's new Soviet government.
Yet, the legalisation of private, adult and consensual homosexual relations only applied to Russia itself. Homosexuality or sodomy remained a crime in Azerbaijan (officially criminalised in 1923), as well as in the Transcaucasian and Central Asian Soviet Republics throughout the 1920s. Similar criminal laws were enacted in Uzbekistan in 1926 and in Turkmenistan the following year. Criminalisation of homosexuality during this time was exclusive to nations of the Soviet Union associated with "cultural backwardness."
The Wikipedia article really only considers the legal situation, apart from the unsourced statement openly gay persons were able to serve in Russia's new Soviet government.
What was the situation for gays in this time period in practice, specifically in the RSFSR? Did the fact that homosexuality was legalised as one of the first countries in Europe mean that it was a preferable place for practicing gays to be compared to countries in Western Europe. In Western Europe many countries didn't legalise homosexuality until decades later? Or was this just a law that looked nice on paper, but had no meaning in practice?