In my experience the transit security and passport control can be cleared quickly at RIX though I have an EU passport which probably helps with latter. Also based on one experience about 20 minutes is not enough for non-Schengen - Schengen connection, but it was close. BT did book me to later flight but initially they had trouble finding me a seat in same day flight and were going to book me a hotel room and flight next morning. I convinced the agent to try harder and somehow she eventually found me a seat in same day departure.
There are always more risks with tight connections, but I wouldn't say the risk in RIX is particularly high. FlightStats show 96% on-time arrival performance for BT417 with 51 flights on time, one late and one excessively late.