Answer
To achieve a safety factor $SF = 2.0$, the groove depth $d$ must satisfy $d \ge \frac{2 P}{\pi D S_y}$, where $P$ is the thrust load, $D$ is the shaft/bore diameter, and $S_y$ is the yield strength of the groove material. Furthermore, the edge margin (the distance from the groove to the end of the shaft) must be at least $3d$ to prevent shear-out of the material. In high-pressure hydraulic cylinders, we often specify a 'square' groove geometry with a maximum corner radius of 0.1 mm to maximize the contact area between the ring and the groove wall.