File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
svc/pkg/mm/worker/src/workers Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,23 @@ async fn worker(ctx: &OperationContext<mm::msg::player_remove::Message>) -> Glob
8383 tracing:: error!( "discarding stale message" ) ;
8484 return Ok ( ( ) ) ;
8585 } else {
86- retry_bail ! ( "player not found, may be race condition with insertion" ) ;
86+ // Delete what we can. Remove from GC so this message doesn't get published again.
87+ tracing:: warn!(
88+ ?player_id,
89+ "player not found in sql or redis, cleaning up & discarding message"
90+ ) ;
91+ let player_id_str = player_id. to_string ( ) ;
92+ redis:: pipe ( )
93+ . del ( util_mm:: key:: player_config ( player_id) )
94+ . ignore ( )
95+ . zrem ( util_mm:: key:: player_unregistered ( ) , & player_id_str)
96+ . ignore ( )
97+ . zrem ( util_mm:: key:: player_auto_remove ( ) , & player_id_str)
98+ . ignore ( )
99+ . query_async ( & mut ctx. redis_mm ( ) . await ?)
100+ . await ?;
101+
102+ return Ok ( ( ) ) ;
87103 } ;
88104
89105 // Validate lobby
You can’t perform that action at this time.
0 commit comments